Revision 6dcf04cf
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
46 | 46 |
use SL::MoreCommon; |
47 | 47 |
use SL::IC; |
48 | 48 |
use SL::IO; |
49 |
use SL::TransNumber; |
|
49 | 50 |
use Data::Dumper; |
50 | 51 |
|
51 | 52 |
use strict; |
... | ... | |
515 | 516 |
my ($self, $myconfig, $form, $provided_dbh, $payments_only) = @_; |
516 | 517 |
|
517 | 518 |
# connect to database, turn off autocommit |
518 |
my $dbh = $provided_dbh ? $provided_dbh : $form->dbconnect_noauto($myconfig);
|
|
519 |
my $dbh = $provided_dbh ? $provided_dbh : $form->get_standard_dbh;
|
|
519 | 520 |
|
520 | 521 |
my ($query, $sth, $null, $project_id, @values); |
521 | 522 |
my $exchangerate = 0; |
... | ... | |
538 | 539 |
&reverse_invoice($dbh, $form); |
539 | 540 |
|
540 | 541 |
} else { |
542 |
my $trans_number = SL::TransNumber->new(type => $form->{type}, dbh => $dbh, number => $form->{invnumber}, save => 1); |
|
543 |
$form->{invnumber} = $trans_number->create_unique unless $trans_number->is_unique; |
|
544 |
|
|
541 | 545 |
$query = qq|SELECT nextval('glid')|; |
542 | 546 |
($form->{"id"}) = selectrow_query($form, $dbh, $query); |
543 | 547 |
|
Auch abrufbar als: Unified diff
Beim Buchen von Verkaufsrechnungen erzwingen, dass die Rechnungsnummer eindeutig ist
Fix für Bug 1454.