summaryrefslogtreecommitdiff
path: root/LedgerSMB/IC.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/IC.pm')
-rw-r--r--LedgerSMB/IC.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/LedgerSMB/IC.pm b/LedgerSMB/IC.pm
index c34aebbd..d3db12e8 100644
--- a/LedgerSMB/IC.pm
+++ b/LedgerSMB/IC.pm
@@ -204,6 +204,9 @@ sub get_part {
sub save {
my ( $self, $myconfig, $form ) = @_;
+ $form->{partnumber} =
+ $form->update_defaults( $myconfig, "partnumber", $dbh )
+ if !$form->{partnumber};
( $form->{inventory_accno} ) = split( /--/, $form->{IC_inventory} );
( $form->{expense_accno} ) = split( /--/, $form->{IC_expense} );
@@ -378,9 +381,6 @@ sub save {
( $null, $partsgroup_id ) = split /--/, $form->{partsgroup};
$partsgroup_id *= 1;
- $form->{partnumber} =
- $form->update_defaults( $myconfig, "partnumber", $dbh )
- if !$form->{partnumber};
if ( !$form->{priceupdate} ) {
$form->{priceupdate} = 'now';