X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=bin%2Fmozilla%2Fcp.pl;fp=bin%2Fmozilla%2Fcp.pl;h=9b77e5766b1a7b8f273429fbb7bcb36d65c67dbf;hp=888bf8a9f5669de2fdec483f375780eeb5c071d7;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hpb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44 diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index 888bf8a9f..9b77e5766 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -24,7 +24,8 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1335, USA. #====================================================================== # # Payment module @@ -37,10 +38,10 @@ use SL::IR; use SL::AR; use SL::AP; use Data::Dumper; +use SL::Locale::String qw(t8); use strict; #use warnings; -require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; our ($form, %myconfig, $lxdebug, $locale, $auth); @@ -59,27 +60,6 @@ sub payment { $form->{ARAP} = ($form->{type} eq 'receipt') ? "AR" : "AP"; $form->{arap} = lc $form->{ARAP}; - # setup customer/vendor selection for open invoices - if ($form->{all_vc}) { - # Dieser Zweig funktioniert derzeit NIE. Ggf. ganz raus oder - # alle offenen Zahlungen wieder korrekt anzeigen. jb 12.10.2010 - $form->all_vc(\%myconfig, $form->{vc}, $form->{ARAP}); - } else { - CP->get_openvc(\%myconfig, \%$form); - } - # Auswahlliste für vc zusammenbauen - # Erweiterung für schliessende option und erweiterung um value - # für bugfix 1771 (doppelte Leerzeichen werden nicht 'gepostet') - $form->{"select$form->{vc}"} = ""; - - if ($form->{"all_$form->{vc}"}) { - $form->{"select$form->{vc}"} .= "\n"; - # s.o. jb 12.10.2010 - $form->{"$form->{vc}_id"} = $form->{"all_$form->{vc}"}->[0]->{id}; - # hotfix for 2450. TODO remove legacy code and use L - map { $form->{"select$form->{vc}"} .= "\n" } - @{ $form->{"all_$form->{vc}"} }; - } CP->paymentaccounts(\%myconfig, \%$form); # Standard Konto für Umlaufvermögen @@ -94,13 +74,6 @@ sub payment { map { $form->{selectaccount} .= "\n"; $form->{account} = "$_->{accno}--$_->{description}" if ($_->{accno} eq $accno_arap) } @{ $form->{PR}{"$form->{ARAP}_paid"} }; - # Braucht man das hier überhaupt? Erstmal auskommentieren .. jan 18.12.2010 - # map { - # $form->{"select$form->{ARAP}"} .= - # " # offen: $form->{ARAP} kann raus? - for my $item ($form->{vc}, "account", "currency", $form->{ARAP}) { + for my $item ("account", "currency", $form->{ARAP}) { $form->{$item} = H($form->{$item}); $form->{"select$item"} =~ s/ selected//; $form->{"select$item"} =~ s/option value="\Q$form->{$item}\E">\Q$form->{$item}\E/option selected value="$form->{$item}">$form->{$item}/; } - $vc = - ($form->{"select$form->{vc}"}) - ? qq|| - : qq|{vc} size=35 value="$form->{$form->{vc}}">|; - - $form->{openinvoices} = $form->{all_vc} ? "" : 1; + $form->{openinvoices} = 1; # $locale->text('AR') # $locale->text('AP') + setup_cp_form_action_bar(can_post => !!$form->{rowcount}); + $form->header; $arap = lc $form->{ARAP}; @@ -171,7 +137,6 @@ sub form_header { is_customer => $form->{vc} eq 'customer', is_receipt => $form->{type} eq 'receipt', arap => $arap, - vccontent => $vc, }); $lxdebug->leave_sub; @@ -210,9 +175,7 @@ sub update { $auth->assert('cash'); - my ($new_name_selected) = @_; - - my ($buysell, $newvc, $updated, $exchangerate, $amount); + my ($buysell, $updated, $exchangerate, $amount); if ($form->{vc} eq 'customer') { $buysell = "buy"; @@ -220,59 +183,6 @@ sub update { $buysell = "sell"; } - # if we switched to all_vc - # funktioniert derzeit nicht 12.10.2010 jb - if ($form->{all_vc} ne $form->{oldall_vc}) { - - $form->{openinvoices} = ($form->{all_vc}) ? 0 : 1; - - $form->{"select$form->{vc}"} = ""; - - if ($form->{all_vc}) { - $form->all_vc(\%myconfig, $form->{vc}, $form->{ARAP}); - - if ($form->{"all_$form->{vc}"}) { - map { - $form->{"select$form->{vc}"} .= - "