ソースを参照

Ajustes pagaré anillos

sebastian 5 年 前
コミット
c58805d4eb
1 ファイル変更36 行追加10 行削除
  1. 36 10
      static/src/js/main.js

+ 36 - 10
static/src/js/main.js

@@ -312,13 +312,13 @@ openerp.pagare_anillos = function (instance, local) {
             // });
 
 
-           //  _.each(self.AccountInvoiceQuota, function(item){
-           //      docQuotaItem.push({
-           //          date : moment(item.date).format('DD/MM/YYYY'),
-           //          name : item.name,
-           //          amount : accounting.formatMoney(item.amount,'',CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator),
-           //      });
-           //  });
+            // _.each(self.AccountInvoiceQuota, function(item){
+            //     docQuotaItem.push({
+            //         date : moment(item.date).format('DD/MM/YYYY'),
+            //         name : item.name,
+            //         amount : accounting.formatMoney(item.amount,'',CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator),
+            //     });
+            // });
            //  getColumnsQuota.push({
            //      title : 'Fecha',
            //      halign: 'center',
@@ -366,7 +366,7 @@ openerp.pagare_anillos = function (instance, local) {
 
             pdfDoc.setFontSize(10);
             pdfDoc.setFontStyle('normal');
-            pdfDoc.text(10,finalY2,'En Ciudad del Este de la República del Paraguay, en fecha ' + moment(AccountInvoice[0].date_invoice).format('DD/MM/YYYY') + ' entre el señor ANIBAL ZARACHO LOPEZ, más');
+            pdfDoc.text(10,finalY2,'En Ciudad del Este de la República del Paraguay, en fecha ' + moment(AccountInvoice[0].date_invoice).format('DD/MM/YYYY') + ' entre el señor ANIBAL ZARACHO LOPEZ, más' );
 
             finalY2 +=5
             pdfDoc.setFontSize(10);
@@ -522,6 +522,32 @@ openerp.pagare_anillos = function (instance, local) {
             pdfDoc.setTextColor(40);
             pdfDoc.text(85,finalY2 ,'Información de Cuotas ');
 
+            var docQuotaItem = [];
+            var getColumnsQuota = [];
+
+             _.each(self.AccountInvoiceQuota, function(item){
+                 docQuotaItem.push({
+                     date : moment(item.date).format('DD/MM/YYYY'),
+                     name : item.name,
+                     amount : accounting.formatMoney(item.amount,'',CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator),
+                 });
+             });
+
+              getColumnsQuota.push({
+                  title : 'Fecha',
+                  halign: 'center',
+                  dataKey: 'date'
+              });
+              getColumnsQuota.push({
+                  title : 'Descripción',
+                  halign: 'center',
+                  dataKey: 'name'
+              });
+              getColumnsQuota.push({
+                  title : 'Valor de la Cuota',
+                  halign: 'center',
+                  dataKey: 'amount'
+              });
 
 
             pdfDoc.autoTable(getColumnsQuota, docQuotaItem, {
@@ -579,12 +605,12 @@ openerp.pagare_anillos = function (instance, local) {
             var paragraph= "SEXTA: Las partes acuerdan que en caso de controversia se sometan a los juzgados de Ciudad del Este. En prueba de conformidad firmar las partes y suscriben el presente contrato.";
             pdfDoc.text(paragraph,10,finalY2,{maxWidth:188,align:'justify'});
 
-            finalY2 +=20
+            finalY2 +=11
             pdfDoc.setFontSize(10);
             pdfDoc.setFontStyle('bold');
             pdfDoc.text(10,finalY2,'Firma del deudor: _ _ _ _ _ _ _ _ _ _ _ _                      Firma del codeudor: _ _ _ _ _ _ _ _ _ _ _ _ _ _');
 
-            finalY2 +=15
+            finalY2 +=10
             pdfDoc.setFontSize(10);
             pdfDoc.setFontStyle('bold');
             pdfDoc.text(40,finalY2,'Firma del representante: _ _ _ _ _ _ _ _ _ _ _ _ _ _');