[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[4621] branches/1.3



Revision: 4621
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4621&view=rev
Author:   einhverfr
Date:     2012-03-28 12:09:13 +0000 (Wed, 28 Mar 2012)
Log Message:
-----------
PDF Pricelists

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/UI/Contact/pricelist.html
    branches/1.3/UI/Contact/pricelist.tex
    branches/1.3/UI/lib/dynatable.tex

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2012-03-28 11:37:37 UTC (rev 4620)
+++ branches/1.3/Changelog	2012-03-28 12:09:13 UTC (rev 4621)
@@ -7,6 +7,7 @@
 * Corrected build issues w/Makefile due to inclusion of LedgerSMB.pm (Chris T)
 * ledgersmb.conf.default : Update default PATH (H Sorli, item 3430019)
 * Fixed imballanced payments when early payment discount processed (Chris T)
+* Pricelists exportable as PDF (Chris T)
 
 Chris B is Chris Bennet
 Chris T is Chris Travers

Modified: branches/1.3/UI/Contact/pricelist.html
===================================================================
--- branches/1.3/UI/Contact/pricelist.html	2012-03-28 11:37:37 UTC (rev 4620)
+++ branches/1.3/UI/Contact/pricelist.html	2012-03-28 12:09:13 UTC (rev 4621)
@@ -80,7 +80,9 @@
     name = "action"
     text = text('Save')
    value = "save_pricelist"
-} ?>
+} ?> <a href="customer.pl?action=pricelist&format=PDF&credit_id=<?lsmb 
+             credit_id ?>&entity_id=<?lsmb entity_id 
+     ?>">[<?lsmb text('PDF') ?>]</a>
 <?lsmb IF pricematrix_pricegroup;
      PROCESS dynatable
          tbody = { rows = pricematrix_pricegroup };

Modified: branches/1.3/UI/Contact/pricelist.tex
===================================================================
--- branches/1.3/UI/Contact/pricelist.tex	2012-03-28 11:37:37 UTC (rev 4620)
+++ branches/1.3/UI/Contact/pricelist.tex	2012-03-28 12:09:13 UTC (rev 4621)
@@ -1,4 +1,4 @@
-<?lsmb  FILTER latex ?>
+<?lsmb   FILTER latex ?>
 \documentclass[a4paper]{article}
 \usepackage{longtable}
 \usepackage[margin=1cm]{geometry}
@@ -53,11 +53,13 @@
       PROCESS dynatable
     attributes = { id = 'pricematrix' }
          tbody = { rows = pricematrix }
+    firsthead = '\multicolumn{4}{l}{' _ text('Pricelist for [_1]', name)
+                  _ '}';
 
-   #IF pricematrix_pricegroup.size() > 0 ;
-   #  PROCESS dynatable
-   #      tbody = { rows = pricematrix_pricegroup };
-   #END;
+   IF pricematrix_pricegroup.size() > 0 ;
+     PROCESS dynatable
+         tbody = { rows = pricematrix_pricegroup };
+   END;
 -?>
 \end{document}
 <?lsmb  END ?>

Modified: branches/1.3/UI/lib/dynatable.tex
===================================================================
--- branches/1.3/UI/lib/dynatable.tex	2012-03-28 11:37:37 UTC (rev 4620)
+++ branches/1.3/UI/lib/dynatable.tex	2012-03-28 12:09:13 UTC (rev 4621)
@@ -26,15 +26,14 @@
    ELSIF COL.palign;
         COL.palign;
    ELSE;
-        'r';
+        'l';
    END;
    IF COL.psep_after;
       '|';
    END;
 END; 
 -?>}
-<?lsmb- IF firsthead; firsthead ?>\\
-\endfirsthead
+<?lsmb IF firsthead; firsthead ?>\\
 <?lsmb- END ?>
 <?lsmb IF head; head ?>\\<?lsmb- END ?>
 <?lsmb- -?>
@@ -48,6 +47,17 @@
 END;
 -?>\\
 \hline\hline
+\endfirsthead
+<?lsmb 
+SKIP_TYPES = ['hidden', 'radio', 'checkbox'];
+
+FOREACH COL IN columns;
+    IF 0 == SKIP_TYPES.grep(COL.type).size();
+        COL.name _ ' & ';
+    END;
+END;
+-?>\\
+\hline\hline
 \endhead
 <?lsmb
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.