Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 077ebb6c

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID 077ebb6c7e6b6ba243da85dbede70ff57927db01
  • Vorgänger 34e47354
  • Nachfolger 3915f5c6

Beim Stornieren von Einkaufs- und Verkaufsrechnung auch die storno_id mit speichern (analog zu AR.pm/AP.pm), damit später eine Unterscheidung zwischen Stornorechnung und stornierter Rechnung möglich ist.

Unterschiede anzeigen:

SL/IR.pm
553 553
                curr = ?,
554 554
                department_id = ?,
555 555
                storno = ?,
556
                storno_id = ?,
556 557
                globalproject_id = ?,
557 558
                cp_id = ?,
558 559
                employee_id = ?
......
564 565
             conv_date($form->{duedate}), $taxzone_id,
565 566
             $form->{taxincluded} ? 't' : 'f',
566 567
             $form->{notes}, $form->{intnotes}, $form->{currency}, conv_i($form->{department_id}),
567
             $form->{storno} ? 't' : 'f',
568
             $form->{storno} ? 't' : 'f', conv_i($form->{storno_id}),
568 569
             conv_i($form->{globalproject_id}), conv_i($form->{cp_id}),
569 570
             conv_i($form->{employee_id}),
570 571
             conv_i($form->{id}));
SL/IS.pm
992 992
                employee_id = ?,
993 993
                salesman_id = ?,
994 994
                storno = ?,
995
                storno_id = ?,
995 996
                globalproject_id = ?,
996 997
                cp_id = ?,
997 998
                transaction_description = ?,
......
1009 1010
             conv_i($form->{"shipto_id"}),
1010 1011
             conv_i($form->{"delivery_customer_id"}), conv_i($form->{"delivery_vendor_id"}),
1011 1012
             conv_i($form->{"employee_id"}), conv_i($form->{"salesman_id"}),
1012
             $form->{"storno"} ? 't' : 'f', conv_i($form->{"globalproject_id"}),
1013
             $form->{"storno"} ? 't' : 'f', conv_i($form->{storno_id}), conv_i($form->{"globalproject_id"}),
1013 1014
             conv_i($form->{"cp_id"}), $form->{transaction_description},
1014 1015
             $form->{marge_total}, $form->{marge_percent},
1015 1016
             conv_i($form->{"id"}));
......
2162 2163
sub is_storno {
2163 2164
  $main::lxdebug->enter_sub();
2164 2165

  
2165
  my ($self, $myconfig, $form, $table) = @_;
2166
  my ($self, $myconfig, $form, $table, $id) = @_;
2166 2167

  
2167
  $main::lxdebug->leave_sub() and return 0 unless ($form->{id});
2168
  $main::lxdebug->leave_sub() and return 0 unless ($id);
2168 2169

  
2169 2170
  # make sure there's no funny stuff in $table
2170 2171
  # ToDO: die when this happens and throw an error
......
2173 2174
  my $dbh = $form->dbconnect($myconfig);
2174 2175

  
2175 2176
  my $query = qq|SELECT storno FROM $table WHERE id = ?|;
2176
  my ($result) = selectrow_query($form, $dbh, $query, $form->{id});
2177
  my ($result) = selectrow_query($form, $dbh, $query, $id);
2177 2178

  
2178 2179
  $dbh->disconnect();
2179 2180

  

Auch abrufbar als: Unified diff