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

SF.net SVN: ledger-smb:[4506] trunk



Revision: 4506
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4506&view=rev
Author:   einhverfr
Date:     2012-03-17 10:46:58 +0000 (Sat, 17 Mar 2012)
Log Message:
-----------
Merging pricelist fixes from branches/1.3

Modified Paths:
--------------
    trunk/UI/Contact/pricelist.html
    trunk/UI/lib/dynatable.html
    trunk/css/ledgersmb.css

Property Changed:
----------------
    trunk/
    trunk/LedgerSMB/Scripts/account.pm
    trunk/LedgerSMB/Scripts/admin.pm
    trunk/LedgerSMB/Scripts/customer.pm
    trunk/LedgerSMB/Scripts/employee.pm
    trunk/LedgerSMB/Scripts/file.pm
    trunk/LedgerSMB/Scripts/journal.pm
    trunk/LedgerSMB/Scripts/login.pm
    trunk/LedgerSMB/Scripts/menu.pm
    trunk/LedgerSMB/Scripts/payment.pm
    trunk/LedgerSMB/Scripts/recon.pm
    trunk/LedgerSMB/Scripts/setup.pm
    trunk/LedgerSMB/Scripts/taxform.pm
    trunk/LedgerSMB/Scripts/vendor.pm
    trunk/sql/upgrade/1.2-1.3-manual.sql


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-4499
   + /branches/1.3:3711-4505


Property changes on: trunk/LedgerSMB/Scripts/account.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/account.pm:4369-4499
/branches/1.3/scripts/account.pl:3711-4368
   + /branches/1.3/LedgerSMB/Scripts/account.pm:4369-4505
/branches/1.3/scripts/account.pl:3711-4368


Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4499
/branches/1.3/scripts/admin.pl:3711-3903,4273-4287
   + /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4505
/branches/1.3/scripts/admin.pl:3711-3903,4273-4287


Property changes on: trunk/LedgerSMB/Scripts/customer.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/customer.pm:4288-4499
/branches/1.3/scripts/customer.pl:4273-4287
   + /branches/1.3/LedgerSMB/Scripts/customer.pm:4288-4505
/branches/1.3/scripts/customer.pl:4273-4287


Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4499
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310
   + /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4505
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310


Property changes on: trunk/LedgerSMB/Scripts/file.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4499
/branches/1.3/scripts/file.pl:3711-4138
   + /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4505
/branches/1.3/scripts/file.pl:3711-4138


Property changes on: trunk/LedgerSMB/Scripts/journal.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/journal.pm:4288-4499
/branches/1.3/scripts/journal.pl:3711-4328
   + /branches/1.3/LedgerSMB/Scripts/journal.pm:4288-4505
/branches/1.3/scripts/journal.pl:3711-4328


Property changes on: trunk/LedgerSMB/Scripts/login.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/login.pm:4193-4499
/branches/1.3/scripts/login.pl:3711-4192
   + /branches/1.3/LedgerSMB/Scripts/login.pm:4193-4505
/branches/1.3/scripts/login.pl:3711-4192


Property changes on: trunk/LedgerSMB/Scripts/menu.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/menu.pm:4155-4499
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287
   + /branches/1.3/LedgerSMB/Scripts/menu.pm:4155-4505
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287


Property changes on: trunk/LedgerSMB/Scripts/payment.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4499
/branches/1.3/scripts/payment.pl:3711-4310
   + /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4505
/branches/1.3/scripts/payment.pl:3711-4310


Property changes on: trunk/LedgerSMB/Scripts/recon.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4499
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438
   + /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4505
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438


Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4499
/branches/1.3/scripts/setup.pl:3711-4474
   + /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4505
/branches/1.3/scripts/setup.pl:3711-4474


Property changes on: trunk/LedgerSMB/Scripts/taxform.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/taxform.pm:4193-4499
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287
   + /branches/1.3/LedgerSMB/Scripts/taxform.pm:4193-4505
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287


Property changes on: trunk/LedgerSMB/Scripts/vendor.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/vendor.pm:4288-4499
/branches/1.3/scripts/vendor.pl:4273-4287
   + /branches/1.3/LedgerSMB/Scripts/vendor.pm:4288-4505
/branches/1.3/scripts/vendor.pl:4273-4287

Modified: trunk/UI/Contact/pricelist.html
===================================================================
--- trunk/UI/Contact/pricelist.html	2012-03-17 10:41:03 UTC (rev 4505)
+++ trunk/UI/Contact/pricelist.html	2012-03-17 10:46:58 UTC (rev 4506)
@@ -1,5 +1,6 @@
 <?lsmb INCLUDE 'ui-header.html' ?>
 <?lsmb PROCESS 'elements.html' ?>
+<?lsmb PROCESS 'dynatable.html' ?>
 <!-- 
 
 The overall structure here is imagined to be a list of individual price
@@ -13,79 +14,59 @@
 <?lsmb account_class = entity_class ?>
 <body>
 <div class="listtop"><?lsmb text('Pricelist') ?> <?lsmb pricematrix.length ?></div>
-<table>
-<tr class="listheading">
-<th class="listheading"><?lsmb text('Partnumber') ?></th>
-<th class="listheading"><?lsmb text('Description') ?></th>
-<th class="listheading"><?lsmb IF accont_class == 1; 
-                                   text('Last Cost');
-                               ELSE;
-                                   text('Sell Price'); 
-                               END ?></th>
-<?lsmb IF account_class == 2 ?>
-<th class="listheading"><?lsmb text('Valid From') ?></th>
-<th class="listheading"><?lsmb text('Valid To') ?></th>
-<?lsmb ELSE ?>
-<th class="listheading"><?lsmb text('Vendor Partnumber') ?></th>
-<th class="listheading"><?lsmb text('Lead Time') ?></th>
-<?lsmb END ?>
-<th class="listheading"><?lsmb text('Currency') ?></th>
-<th class="listheading">&nbsp;</th>
-</tr>
-<?lsmb FOR pm IN pricematrix ?>
-<tr>
-<td><?lsmb pm.int_partnumber ?></td>
-<td><?lsmb pm.description ?></td>
-<td><?lsmb IF account_class == 1; pm.lastcost; ELSE; pm.sellprice; END ?>
-</td>
-<?lsmb IF account_class == 2; ?>
-<td><?lsmb pm.validfrom ?></td>
-<td><?lsmb pm.validto ?></td>
-<?lsmb ELSE ?>
-<td><?lsmb pm.partnumber ?></td>
-<td><?lsmb pm.leadtime ?></td>
-<?lsmb END  ?>
-<td><?lsmb pm.currency ?></td>
-<td><a href="<?lsmb script ?>?action=delete_pricematrix&credit_id=<?lsmb id ?>&entry_id=<?lsmb pm.entry_id ?>">[<?lsmb text('Delete') ?>]</a></td>
-</tr>
-<?lsmb END # FOR pricematrix ?>
-</table>
-
-<?lsmb IF pricematrix_pricegroup ?>
-<div class="listtop"><?lsmb text('Pricelist for Pricegroup') ?></div>
-<table>
-<tr class="listheading">
-<th class="listheading"><?lsmb text('Partnumber') ?></th>
-<th class="listheading"><?lsmb text('Description') ?></th>
-<th class="listheading"><?lsmb IF accont_class == 1; 
-                                   text('Last Cost');
-                               ELSE;
-                                   text('Sell Price');
-                               END ?></th>
-<?lsmb IF account_class == 2 ?>
-<th class="listheading"><?lsmb text('Valid From') ?></th>
-<th class="listheading"><?lsmb text('Valid To') ?></th>
-<?lsmb ELSE ?>
-<th class="listheading"><?lsmb text('Vendor Partnumber') ?></th>
-<th class="listheading"><?lsmb text('Lead Time') ?></th>
-<?lsmb END ?>
-<th class="listheading"><?lsmb text('Currency') ?></th>
-<?lsmb FOR pm IN pricematrix_pricegroup ?>
-<tr>
-<td><?lsmb pm.int_partnumber ?></td>
-<td><?lsmb pm.description ?></td>
-<td><?lsmb IF account_class == 1; pm.lastcost; ELSE; pm.sellprice; END ?>
-</td>
-<?lsmb IF account_class == 2; ?>
-<td><?lsmb pm.validfrom ?></td>
-<td><?lsmb pm.validto ?></td>
-<?lsmb ELSE ?>
-<td><?lsmb pm.partnumber ?></td>
-<td><?lsmb pm.leadtime ?></td>
-<?lsmb END  ?>
-<td><?lsmb pm.currency ?></td>
-</table>
-<?lsmb END ?>
-<?lsmb END ?>
+<?lsmb 
+    columns = [ { col_id = 'int_partnumber'
+                  name = text('Partnumber')
+                  type = 'text'
+                },
+                { col_id = 'description'
+                  name = text('Description')
+                  type = 'text'
+                } ];
+     IF account_class == 1;
+         columns.push(
+                  {col_id = 'lastcost'
+                     name = text('Last Cost') #'
+                     type = 'text_input'},
+                  {col_id = 'partnumber',
+                     name = text('Vendor Partnumber') #'
+                     type = 'text_input'},
+                  {col_id = 'leadtime',
+                     name = text('Lead Time') #'
+                     type = 'input_text'}
+         );
+     ELSE;
+         columns.push(
+                  {col_id = 'sellprice'
+                     name = text('Sell Price') #'
+                     type = 'text_input'},
+                  {col_id = 'validfrom',
+                     name = text('Valid From') #'
+                     type = 'text_input'},
+                  {col_id = 'validto',
+                     name = text('Valid To') #'
+                     type = 'text_input'},
+         );
+                        
+     END;
+     columns.push({col_id = 'currency',
+                     name = text('Currency'),
+                     type = 'text'},
+                  {col_id = 'delete',
+                     name = '&nbsp;',
+                     type = 'href',
+                href_base = script _ '?action=delete_pricematrix&credit_id=' 
+                            _ id _ '&entry_id=' }
+     );
+     FOREACH pm IN pricematrix;
+         pm.delete = '[' _ text('Delete') _ ']';
+         pm.row_id = pm.entry_id;
+     END;
+     PROCESS dynatable
+         tbody = { rows = pricematrix }; ?>
+<?lsmb IF pricematrix_pricegroup;
+     PROCESS dynatable
+         tbody = { rows = pricematrix_pricegroup };
+       END ?>
 </body>
 </html>

Modified: trunk/UI/lib/dynatable.html
===================================================================
--- trunk/UI/lib/dynatable.html	2012-03-17 10:41:03 UTC (rev 4505)
+++ trunk/UI/lib/dynatable.html	2012-03-17 10:46:58 UTC (rev 4506)
@@ -1,5 +1,5 @@
 <?lsmb BLOCK dynatable ?>
-<table id="<?lsmb attributes.id ?>" class="<?lsmb attributes.class">
+<table id="<?lsmb attributes.id ?>" class="<?lsmb attributes.class ?>">
 <?lsmb- IF !hide_header -?>
 <thead>
    <tr>
@@ -44,8 +44,9 @@
               value="<?lsmb ROW.row_id ?>"
                <?lsmb CHECKED ?> />
          <?lsmb- ELSIF COL.type == 'href'; 
-                   IF row.${COL.col_id}_href_suffix;
-                      HREF = COL.href_base _ ROW.${COL.col_id}_href_suffix;
+                   HREF_SFX = COL.col_id _ "_href_suffix";
+                   IF row.$HREF_SFX;
+                      HREF = COL.href_base _ ROW.$HREF_SFX;
                    ELSE;
                       HREF = COL.href_base _ ROW.row_id;
                    END
@@ -67,7 +68,7 @@
      IF tfoot.coltypes.${COL.col_id} == 'spacer';
         SPACECOUNT = SPACECOUNT + 1;
      ELSE;
-       IF SPACECOUNT gt 0 ?>
+       IF SPACECOUNT > 0 ?>
           <td colspan="<?lsmb SPACECOUNT ?>">&nbsp;</td>
        <?lsmb END ?>
      <td class="<?lsmb COL.col_id ?>">
@@ -76,7 +77,7 @@
           ELSE; 
              TYPE = COL.type;
           END;
-          <?lsmb- IF TYPE == 'input_text' -?>
+          IF TYPE == 'input_text' -?>
           <input id="<?lsmb COL.col_id ?>-<?lsmb loop.count ?>"
                type="text"
               class="<?lsmb COL.class ?>"
@@ -104,6 +105,13 @@
               value="<?lsmb ROW.row_id ?>"
                <?lsmb CHECKED ?> />
          <?lsmb- ELSIF TYPE == 'href'; 
+                   HREF_SFX = COL.col_id _ "_href_suffix";
+                   IF row.$HREF_SFX;
+                      HREF = COL.href_base _ ROW.$HREF_SFX;
+                   ELSE;
+                      HREF = COL.href_base _ ROW.row_id;
+                   END
+          ?><a href="<?lsmb HREF ?>"><?lsmb ROW.${COL.col_id} ?></a>
                    IF row.${COL.col_id}_href_suffix;
                       HREF = COL.href_base _ ROW.${COL.col_id}_href_suffix;
                    ELSE;

Modified: trunk/css/ledgersmb.css
===================================================================
--- trunk/css/ledgersmb.css	2012-03-17 10:41:03 UTC (rev 4505)
+++ trunk/css/ledgersmb.css	2012-03-17 10:46:58 UTC (rev 4506)
@@ -156,7 +156,7 @@
 }
 
 .listtop { font-size: 10pt; background-color: black; color: white; }
-.listheading { font-size: 10pt; background-color: #004a80; color: white; }
+.listheading, thead th { font-size: 10pt; background-color: #004a80; color: white; }
 A.listheading:link, A.listheading:active, A.listheading:visited {
   text-decoration: none; }
 .listrow1 { font-size: 10pt; background-color: #e6e6fa; color: black; vertical-align: top; }


Property changes on: trunk/sql/upgrade/1.2-1.3-manual.sql
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4499
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
   + /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4505
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710

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