瀏覽代碼

ADD FIX Extensión eiru_reports informe especial para radio positiva - suceso

Sebas 6 年之前
父節點
當前提交
a396ad79fe
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 4 0
      models.py
  2. 2 0
      static/src/js/reports/report_account_pay.js

+ 4 - 0
models.py

@@ -112,6 +112,10 @@ class AccountVoucher(models.Model):
 				'number':voucher.number,
 				'journal_id': voucher.journal_id.id,
 				'amount': voucher.amount,
+				'currency_id': [
+					voucher.currency_id.id,
+					voucher.currency_id.name,
+				],
 				'reference' : voucher.reference,
 			})
 

+ 2 - 0
static/src/js/reports/report_account_pay.js

@@ -614,7 +614,9 @@ function report_account_pay(reporting){
 
                         if(AccountVoucher.length > 0){
                             _.each(AccountVoucher, function(item2){
+                                console.log(item2);
                                 var CurrencyVoucher = self.getResCurrency(item2.currency_id[0]).shift();
+
                                 var amount_pagado = 0;
                                 if(CurrencyVoucher.id != CurrencyBase.id){
                                     amount_pagado = accounting.formatMoney(item2.amount_currency, '', CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator) + ' (' + accounting.formatMoney(item2.amount, '', CurrencyVoucher.decimal_places, CurrencyVoucher.thousands_separator, CurrencyVoucher.decimal_separator) +')';