[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3207] trunk/LedgerSMB/OE.pm
- Subject: SF.net SVN: ledger-smb:[3207] trunk/LedgerSMB/OE.pm
- From: ..hidden..
- Date: Wed, 08 Jun 2011 23:48:20 +0000
Revision: 3207
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3207&view=rev
Author: einhverfr
Date: 2011-06-08 23:48:20 +0000 (Wed, 08 Jun 2011)
Log Message:
-----------
Precision fix for invoice/orders with inventory items, so trailing zeroes are preserved
Modified Paths:
--------------
trunk/LedgerSMB/OE.pm
Modified: trunk/LedgerSMB/OE.pm
===================================================================
--- trunk/LedgerSMB/OE.pm 2011-06-08 23:47:51 UTC (rev 3206)
+++ trunk/LedgerSMB/OE.pm 2011-06-08 23:48:20 UTC (rev 3207)
@@ -500,7 +500,7 @@
$query .= qq|
trans_id, parts_id, description, qty, sellprice,
discount, unit, reqdate, project_id, ship,
- serialnumber, notes)
+ serialnumber, notes, precision)
VALUES (|;
$query .= qq| ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|;
$sth = $dbh->prepare($query);
@@ -510,7 +510,9 @@
$fxsellprice, $form->{"discount_$i"},
$form->{"unit_$i"}, $form->{"reqdate_$i"},
$project_id, $form->{"ship_$i"},
- $form->{"serialnumber_$i"}, $form->{"notes_$i"} );
+ $form->{"serialnumber_$i"}, $form->{"notes_$i"},
+ $form->{"precision_$i"}
+ );
$sth->execute(@queryargs) || $form->dberror($query);
$dbh->commit;
$form->{"sellprice_$i"} = $fxsellprice;
@@ -828,7 +830,7 @@
# retrieve individual items
$query = qq|
SELECT o.id AS orderitems_id, p.partnumber, p.assembly,
- o.description, o.qty, o.sellprice,
+ o.description, o.qty, o.sellprice, o.precision,
o.parts_id AS id, o.unit, o.discount, p.bin,
o.reqdate, o.project_id, o.ship, o.serialnumber,
o.notes, pr.projectnumber, pg.partsgroup,
@@ -2621,10 +2623,12 @@
INSERT INTO orderitems
(trans_id, parts_id, description,
qty, sellprice, discount, unit, reqdate,
- project_id, ship, serialnumber, notes)
+ project_id, ship, serialnumber, notes,
+ precision)
SELECT ?, parts_id, description,
qty, sellprice, discount, unit, reqdate,
- project_id, ship, serialnumber, notes
+ project_id, ship, serialnumber, notes,
+ precision
FROM orderitems
WHERE trans_id IN ($orderid_str)|;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.