[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4042] branches/1.3
- Subject: SF.net SVN: ledger-smb:[4042] branches/1.3
- From: ..hidden..
- Date: Thu, 24 Nov 2011 09:16:07 +0000
Revision: 4042
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4042&view=rev
Author: einhverfr
Date: 2011-11-24 09:16:06 +0000 (Thu, 24 Nov 2011)
Log Message:
-----------
First draft of completed pricelist patch
Modified Paths:
--------------
branches/1.3/LedgerSMB/ScriptLib/Company.pm
Added Paths:
-----------
branches/1.3/UI/Contact/pricelist.html
Modified: branches/1.3/LedgerSMB/ScriptLib/Company.pm
===================================================================
--- branches/1.3/LedgerSMB/ScriptLib/Company.pm 2011-11-24 08:46:32 UTC (rev 4041)
+++ branches/1.3/LedgerSMB/ScriptLib/Company.pm 2011-11-24 09:16:06 UTC (rev 4042)
@@ -981,6 +981,30 @@
_render_main_screen($company );
}
+=item pricelist
+
+This returns and displays the pricelist. The id field is required.
+
+=cut
+
+sub pricelist {
+ my ($request) = @_;
+ my $company = new_company($request);
+ $company->get();
+ $company->get_pricematrix();
+ my $template = LedgerSMB::Template->new(
+ user => $request->{_user},
+ path => 'UI/Company' ,
+ template => 'pricelist',
+ locale => $company->{_locale},
+ );
+
+ $template->render($request);
+}
+
+
+=item delete_price
+
=back
=head1 COPYRIGHT
Added: branches/1.3/UI/Contact/pricelist.html
===================================================================
--- branches/1.3/UI/Contact/pricelist.html (rev 0)
+++ branches/1.3/UI/Contact/pricelist.html 2011-11-24 09:16:06 UTC (rev 4042)
@@ -0,0 +1,87 @@
+<?lsmb INCLUDE 'ui-header.html' ?>
+<?lsmb PROCESS 'elements.html' ?>
+<!--
+
+The overall structure here is imagined to be a list of individual price
+listings followed by the listings for the pricegroup. The reason for including
+both is simply that it makes it easier for someone to see what's going on when
+checking a price deal for a customer.
+
+-CT
+
+-->
+<body>
+<div class="listtop"><?lsmb text('Pricelist') ?></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') ?></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"> </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') ?></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 ?>
+</body>
+</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.