X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcp.pl;h=a62a9ebff84d26bb96cd87f4258eef18da8b42ac;hb=0e6197ea79295e1a1232617ee4ed4ae99d8a0640;hp=6a21edecbbf1990eed7f7a3320ebeb7d85702136;hpb=6607a7145fc56b322e1c24afd07f72f085a25465;p=kivitendo-erp.git diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index 6a21edecb..a62a9ebff 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -32,7 +32,6 @@ #====================================================================== use SL::CP; -use SL::OP; use SL::IS; use SL::IR; @@ -74,14 +73,14 @@ sub payment { } # departments - if (@{ $form->{all_departments} }) { + if (@{ $form->{all_departments} || [] }) { $form->{selectdepartment} = "\n"; $form->{department} = "$form->{department}--$form->{department_id}"; map { $form->{selectdepartment} .= "$_->{description}--$_->{id}\n" - } (@{ $form->{all_departments} }); + } (@{ $form->{all_departments} || [] }); } CP->paymentaccounts(\%myconfig, \%$form); @@ -145,17 +144,17 @@ sub form_header { $form->format_amount(\%myconfig, $form->{exchangerate}); if ($form->{forex}) { $exchangerate = qq| - - | . $locale->text('Exchangerate') . qq| - {exchangerate}>$form->{exchangerate} - + + | . $locale->text('Exchangerate') . qq| + {exchangerate}>$form->{exchangerate} + |; } else { $exchangerate = qq| - - | . $locale->text('Exchangerate') . qq| - {exchangerate}> - + + | . $locale->text('Exchangerate') . qq| + {exchangerate}> + |; } } @@ -235,82 +234,82 @@ sub form_header { - - - - - - - | . $locale->text('All') . qq| - - - $vclabel - $vc - {vc}"}"> - {"$form->{vc}_id"}> - {vc}"}"> - - - | . $locale->text('Address') . qq| - - - - $form->{street} - - - $form->{zipcode} - - - $form->{city} - - - $form->{country} - - - - - - - - - - | . $locale->text('Memo') . qq| - - - - - - - $department - - | . $locale->text('Account') . qq| - $form->{selectaccount} - - - - - | . $locale->text('Date') . qq| + + + + + + + | . $locale->text('All') . qq| + + + $vclabel + $vc + {vc}"}) . qq|"> + {vc}_id"}) . qq|"> + {vc}"}) . qq|"> + + + | . $locale->text('Address') . qq| + + + + $form->{street} + + + $form->{zipcode} + + + $form->{city} + + + $form->{country} + + + + + + + + + + | . $locale->text('Memo') . qq| + + + + + + + $department + + | . $locale->text('Account') . qq| + $form->{selectaccount} + + + + + | . $locale->text('Date') . qq| $button1 - - - | . $locale->text('Currency') . qq| - $form->{selectcurrency} - - {oldcurrency}> - - $exchangerate - - | . $locale->text('Source') . qq| - - - - | . $locale->text('Amount') . qq| - {selectcurrency}"> + {oldcurrency}> + + $exchangerate + + | . $locale->text('Source') . qq| + + + + | . $locale->text('Amount') . qq| + - - - - + + + + @@ -318,6 +317,19 @@ sub form_header { $jsscript |; + if ($form->{openinvoices_other_currencies}) { + my $warning = $form->{vc} eq 'customer' ? $::locale->text('There are #1 more open invoices for this customer with other currencies.', $form->{openinvoices_other_currencies}) + : $::locale->text('There are #1 more open invoices from this vendor with other currencies.', $form->{openinvoices_other_currencies}); + + print qq| + + + + | . $::locale->text('Note') . qq|: $warning + +|; + } + $lxdebug->leave_sub(); } @@ -340,9 +352,9 @@ sub list_invoices { - - $invoice - + + $invoice + |; $column_data{invnumber} = @@ -405,7 +417,7 @@ sub list_invoices { $j++; $j %= 2; print qq| - + |; map { print "$column_data{$_}\n" } @column_index; print qq| @@ -466,7 +478,7 @@ sub form_footer { $format .= qq| {DF}{postscript}>| . $locale->text('Postscript') . qq| - {DF}{pdf}>| . $locale->text('PDF'); + {DF}{pdf}>| . $locale->text('PDF'); } print qq| @@ -622,7 +634,7 @@ sub update { } # Modified by J.Zach, see abovev - $amount += $form->{"paid_$i"}; + $amount += $form->{"paid_$i"}; } else { $form->{"paid_$i"} = ""; @@ -636,7 +648,7 @@ sub update { } # Line added by J.Zach, see above - $form->{amount}=$amount; + $form->{amount}=$amount; &form_header; &list_invoices; @@ -759,7 +771,7 @@ sub check_form { if ($form->{currency} ne $form->{oldcurrency}) { &update; - exit; + ::end_of_request(); } $form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{amount});