From: Jan Büren Date: Fri, 10 Dec 2010 10:57:21 +0000 (+0100) Subject: Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp X-Git-Tag: release-2.6.2beta1~73 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/a111d6e8e4071fd81d7406e7f3849d6ad28726fd?hp=f6ea0fa8433622ebf657a3a6a92f80e75b058bff Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp --- diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index d54137e72..b3efdec57 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -34,6 +34,8 @@ use SL::CP; use SL::IS; use SL::IR; +use SL::AR; +use SL::AP; use strict ("vars", "subs"); #use warnings; @@ -239,6 +241,10 @@ sub form_header { {vc}_id"}) . qq|"> {vc}"}) . qq|"> + + | . $locale->text('Invoice Number') . qq| + + | . $locale->text('Address') . qq| @@ -518,7 +524,19 @@ sub update { } } } - + # Falls Suche über Rechnungsnummer und kein Kundenname vorhanden + if ($form->{invnumber} && !($form->{$form->{vc}})){ + $form->{open} ='Y'; # nur die offenen rechnungen + if ($form->{ARAP} eq 'AR'){ + AR->ar_transactions(\%myconfig, \%$form); + # den ersten treffen nehmen und mit dem namen überschreiben + $form->{$form->{vc}} = $form->{AR}[0]{name}; + } else { + # s.o. nur für zahlungsausgang + AP->ap_transactions(\%myconfig, \%$form); + $form->{$form->{vc}} = $form->{AP}[0]{name}; + } + } # get customer and invoices $updated = &check_name($form->{vc}); @@ -626,7 +644,9 @@ sub post { } # Beim Aktualisieren wird das Konto übernommen - $form->{callback} = "cp.pl?action=payment&vc=$form->{vc}&type=$form->{type}&account=$form->{account}&$form->{currency}"; + # und jetzt auch Beleg und Datum + $form->{callback} = "cp.pl?action=payment&vc=$form->{vc}&type=$form->{type}&account=$form->{account}&$form->{currency}" . + "&datepaid=$form->{datepaid}&source=$form->{source}"; my $msg1 = "$form->{origtitle} posted!"; my $msg2 = "Cannot post $form->{origtitle}!";