Revision ad0096b7
Von Moritz Bunkus vor fast 11 Jahren hinzugefügt
SL/AR.pm | ||
---|---|---|
40 | 40 |
use SL::IO; |
41 | 41 |
use SL::MoreCommon; |
42 | 42 |
use SL::DB::Default; |
43 |
use SL::TransNumber; |
|
43 | 44 |
|
44 | 45 |
use strict; |
45 | 46 |
|
... | ... | |
136 | 137 |
($form->{id}) = selectrow_query($form, $dbh, $query); |
137 | 138 |
$query = qq|INSERT INTO ar (id, invnumber, employee_id, currency_id) VALUES (?, 'dummy', ?, (SELECT id FROM currencies WHERE name=?))|; |
138 | 139 |
do_query($form, $dbh, $query, $form->{id}, $form->{employee_id}, $form->{currency}); |
139 |
$form->{invnumber} = $form->update_defaults($myconfig, "invnumber", $dbh) unless $form->{invnumber}; |
|
140 |
if (!$form->{invnumber}) { |
|
141 |
my $trans_number = SL::TransNumber->new(type => 'invoice', dbh => $dbh, number => $form->{partnumber}, id => $form->{id}); |
|
142 |
$form->{invnumber} = $trans_number->create_unique; |
|
143 |
} |
|
140 | 144 |
} |
141 | 145 |
} |
142 | 146 |
|
... | ... | |
800 | 804 |
|
801 | 805 |
|
802 | 806 |
1; |
803 |
|
Auch abrufbar als: Unified diff
AR.pm: SL::TransNumber anstelle von Form->update_defaults für Nummernkreise nutzen