[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [730] branches/1.2/LedgerSMB/IC.pm
- Subject: SF.net SVN: ledger-smb: [730] branches/1.2/LedgerSMB/IC.pm
- From: ..hidden..
- Date: Tue, 05 Dec 2006 15:57:16 -0800
Revision: 730
http://svn.sourceforge.net/ledger-smb/?rev=730&view=rev
Author: einhverfr
Date: 2006-12-05 15:57:15 -0800 (Tue, 05 Dec 2006)
Log Message:
-----------
Fixing inability to add assembly items
Modified Paths:
--------------
branches/1.2/LedgerSMB/IC.pm
Modified: branches/1.2/LedgerSMB/IC.pm
===================================================================
--- branches/1.2/LedgerSMB/IC.pm 2006-12-05 23:56:56 UTC (rev 729)
+++ branches/1.2/LedgerSMB/IC.pm 2006-12-05 23:57:15 UTC (rev 730)
@@ -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"} || 0,
+ $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.