X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=df3062f818a08930e328db791c7f7b45c2394992;hb=7e6bdfc6728ec15377f5b78dd1fb4eaefed84962;hp=49e1b7f832acd20872af38d04a8aa96c818a5ca6;hpb=04db23598c90725ff1eb23fb68cff7829392cc55;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 49e1b7f83..df3062f81 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -138,6 +138,7 @@ sub invoice_links { $cp_id = $form->{cp_id}; IS->get_customer(\%myconfig, \%$form); + #quote all_customer Bug 133 foreach $ref (@{ $form->{all_customer} }) { $ref->{name} = $form->quote($ref->{name}); @@ -170,7 +171,7 @@ sub invoice_links { $form->{oldcustomer} = "$form->{customer}--$form->{customer_id}"; - if ($form->{all_customer}) { + if (@{ $form->{all_customer} }) { $form->{customer} = "$form->{customer}--$form->{customer_id}"; map { $form->{selectcustomer} .= "|; foreach $item (@{ $form->{payment_terms} }) { if ($form->{payment_id} eq $item->{id}) { @@ -355,12 +359,12 @@ sub form_header { if (@{ $form->{SHIPTO} }) { $form->{selectshipto} = ""; foreach $item (@{ $form->{SHIPTO} }) { - if ($item->{id} == $form->{shipto_id}) { + if ($item->{shipto_id} == $form->{shipto_id}) { $form->{selectshipto} .= - ""; + ""; } else { $form->{selectshipto} .= - ""; + ""; } } @@ -373,7 +377,7 @@ sub form_header { $shipto = qq| | . $locale->text('Shipping Address') . qq| - + |; @@ -659,7 +663,7 @@ sub form_header { $dunning | . $locale->text('Record in') . qq| - + $taxzone @@ -1093,6 +1097,12 @@ if ($form->{type} eq "credit_note") { . $locale->text('Credit Note') . qq|"> |; } + if ($form->{radier}) { + print qq| + +|; + } if ($invdate > $closedto) { @@ -1197,8 +1207,6 @@ sub update { } else { - $form->{"selected_unit_$i"} = $form->{"unit_$i"}; - IS->retrieve_item(\%myconfig, \%$form); $rows = scalar @{ $form->{item_list} }; @@ -1333,6 +1341,7 @@ sub post_payment { ($form->{AR}) = split /--/, $form->{AR}; ($form->{AR_paid}) = split /--/, $form->{AR_paid}; + relink_accounts(); $form->redirect($locale->text(' Payment posted!')) if (IS->post_payment(\%myconfig, \%$form)); $form->error($locale->text('Cannot post payment!')); @@ -1399,6 +1408,7 @@ sub post { $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber"); } } + relink_accounts(); if ($print_post) { if (!(IS->post_invoice(\%myconfig, \%$form))) { $form->error($locale->text('Cannot post invoice!'));