From 28a2eece85a23e2416c460e388374e8e0e0d9c02 Mon Sep 17 00:00:00 2001 From: alltheworld Date: Sun, 2 Mar 2014 05:13:12 +0200 Subject: [PATCH] report 3-3 --- public/js/script.js | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/public/js/script.js b/public/js/script.js index d1c9140bfdbc..3752ed333229 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -2214,7 +2214,7 @@ function GetReportTemplate3 (invoice,checkMath) SetPdfColor('Black',doc); //set black color doc.setFontType("normal"); - GlobalY=190; + GlobalY=170; var z=GlobalY; @@ -2359,16 +2359,56 @@ function GetReportTemplate3 (invoice,checkMath) qtyRight -= 40; } + + + + + + + + + + + + + + + var costX = unitCostRight - (doc.getStringUnitWidth('Unit Cost') * doc.internal.getFontSize()); var qtyX = qtyRight - (doc.getStringUnitWidth('Quantity') * doc.internal.getFontSize()); var taxX = taxRight - (doc.getStringUnitWidth('Tax') * doc.internal.getFontSize()); - var totalX = lineTotalRight - (doc.getStringUnitWidth('Line Total') * doc.internal.getFontSize()); + var totalX = lineTotalRight - (doc.getStringUnitWidth('Line Total') * doc.internal.getFontSize()) -15; tableTop=GlobalY;//redefine this to dynamic value + doc.setFontSize(12); doc.setFontType("bold"); + + + + + + + + + + doc.setLineWidth(0.3); + + doc.setDrawColor(63,60,60); + doc.setFillColor(63,60,60); + var x1 = tableLeft-tablePadding*2+5 ; + var y1 = GlobalY-doc.internal.getFontSize()-15; + var w2 = 515+tablePadding*2-3;//lineTotalRight-tablePadding*5; + var h2 = doc.internal.getFontSize()+15*2; + doc.rect(x1, y1, w2, h2, 'FD'); + + + SetPdfColor('White',doc); + + + doc.text(tableLeft, tableTop, 'Item'); doc.text(descriptionLeft, tableTop, 'Description'); doc.text(costX, tableTop, 'Unit Cost');