|
@@ -664,6 +664,7 @@ function report_cuenta_resumen_dna(reporting){
|
|
|
var AccountInvoice = self.getAccountInvoice();
|
|
|
_.each(AccountInvoice,function(item2) {
|
|
|
var description_product = '';
|
|
|
+ var date_pay = '';
|
|
|
if(item2.is_anticipo == false){
|
|
|
var total_sale = 0;
|
|
|
var forma = 'Contado';
|
|
@@ -673,6 +674,12 @@ function report_cuenta_resumen_dna(reporting){
|
|
|
if (item2.credito == true){
|
|
|
forma = 'Credito'
|
|
|
};
|
|
|
+ if (!item2.date_pay){
|
|
|
+ date_pay = ''
|
|
|
+ };
|
|
|
+ if (item2.date_pay){
|
|
|
+ date_pay = item2.date_pay
|
|
|
+ };
|
|
|
var AccountInvoiceLine = self.getAccountInvoiceLine(item2.id);
|
|
|
_.each(AccountInvoiceLine, function(line_item){
|
|
|
description_product = description_product + " " + line_item.product_id.name
|
|
@@ -694,7 +701,7 @@ function report_cuenta_resumen_dna(reporting){
|
|
|
invoice_name : self.valorNull(item2.number),
|
|
|
supplier_invoice_number: self.valorNull(item2.supplier_invoice_number),
|
|
|
forma: forma,
|
|
|
- date_pay: moment(item2.date_pay).format('DD/MM/YYYY'),
|
|
|
+ date_pay: moment(date_pay).format('DD/MM/YYYY'),
|
|
|
product_name: description_product,
|
|
|
amount_total: accounting.formatMoney(item2.amount_total_currency, '', CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator),
|
|
|
amount_pagado:accounting.formatMoney(item2.amount_total - item2.residual,'',CurrencyBase.decimal_places,CurrencyBase.thousands_separator,CurrencyBase.decimal_separator),
|