[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [729] trunk/LedgerSMB/IC.pm
- Subject: SF.net SVN: ledger-smb: [729] trunk/LedgerSMB/IC.pm
- From: ..hidden..
- Date: Tue, 05 Dec 2006 15:56:57 -0800
Revision: 729
http://svn.sourceforge.net/ledger-smb/?rev=729&view=rev
Author: einhverfr
Date: 2006-12-05 15:56:56 -0800 (Tue, 05 Dec 2006)
Log Message:
-----------
Fixing inability to add assembly items
Modified Paths:
--------------
trunk/LedgerSMB/IC.pm
Modified: trunk/LedgerSMB/IC.pm
===================================================================
--- trunk/LedgerSMB/IC.pm 2006-12-05 23:42:28 UTC (rev 728)
+++ trunk/LedgerSMB/IC.pm 2006-12-05 23:56:56 UTC (rev 729)
@@ -479,11 +479,17 @@
for $i (1 .. $form->{assembly_rows}) {
$form->{"qty_$i"} = $form->parse_amount(
$myconfig, $form->{"qty_$i"});
- $sth->execute(
- $form->{id}, $form->{"id_$i"},
- $form->{"qty_$i"}, $form->{"bom_$i"},
- $form->{"adj_$i"}
- ) || $form->dberror($query);
+ if(!$form->{"bom_$i"}){
+ $form->{"bom_$i"} = undef;
+ }
+
+ if ($form->{"id_$i"} && $form->{"qty_$i"}){
+ $sth->execute(
+ $form->{id}, $form->{"id_$i"},
+ $form->{"qty_$i"}, $form->{"bom_$i"},
+ $form->{"adj_$i"}
+ ) || $form->dberror($query);
+ }
}
}
# adjust onhand for the parts
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.