X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Far.pl;h=146e421ef17cf985524cf629caebdbbc59aceba1;hb=3f0ba2ba4caabdc8fc3191c5cbd0aba13a8643cb;hp=bb46fca552e20a0918f0b7b3cc00c7fc8fe9a703;hpb=be4e11d36f40d90622fdf35eb07ab207422b5455;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index bb46fca55..146e421ef 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -36,7 +36,7 @@ use SL::IS; use SL::PE; use Data::Dumper; -require "$form->{path}/arap.pl"; +require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; require "bin/mozilla/drafts.pl"; @@ -79,6 +79,7 @@ sub add { # saving the history if(!exists $form->{addition} && ($form->{id} ne "")) { + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "ADDED"; $form->save_history($form->dbconnect(\%myconfig)); } @@ -86,7 +87,7 @@ sub add { $form->{title} = "Add"; $form->{callback} = - "$form->{script}?action=add&path=$form->{path}&login=$form->{login}&password=$form->{password}" + "$form->{script}?action=add&login=$form->{login}&password=$form->{password}" unless $form->{callback}; AR->get_transdate(\%myconfig, $form); @@ -470,18 +471,18 @@ selectcustomer}| $form->{fokus} = "arledger.customer"; # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { # with JavaScript Calendar $button1 = qq| -
| . $locale->text('Customer') . qq| | -$customer | +$customer | @@ -789,12 +794,12 @@ $jsscript |; $column_data{paid} = - qq|{"paid_$i"} onBlur=\"check_right_number_format(this)\"> | |; + qq||; $column_data{AR_paid} = qq| | ${selectAR_paid} | |; $column_data{exchangerate} = qq|$exchangerate | |; $column_data{datepaid} = - qq|{"datepaid_$i"} onBlur=\"check_right_date_format(this)\"> + qq| | |; $column_data{source} = qq| | |; @@ -842,7 +847,6 @@ sub form_footer { -{path}> {login}> {password}> | @@ -898,7 +902,7 @@ sub form_footer { } if ($form->{menubar}) { - require "$form->{path}/menu.pl"; + require "bin/mozilla/menu.pl"; &menubar; } # button for saving history @@ -1020,6 +1024,7 @@ sub post_payment { $form->isblank("datepaid_$i", $locale->text('Payment date missing!')); + $form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{amount}); $form->error($locale->text('Cannot post payment for a closed period!')) if ($datepaid <= $closedto); @@ -1053,6 +1058,7 @@ sub post { $closedto = $form->datetonum($form->{closedto}, \%myconfig); $transdate = $form->datetonum($form->{transdate}, \%myconfig); + $form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{amount}); $form->error($locale->text('Cannot post transaction for a closed period!')) if ($transdate <= $closedto); @@ -1067,6 +1073,7 @@ sub post { $form->isblank("datepaid_$i", $locale->text('Payment date missing!')); + $form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{"amount_$i"}); $form->error($locale->text('Cannot post payment for a closed period!')) if ($datepaid <= $closedto); @@ -1092,6 +1099,7 @@ sub post { if (AR->post_transaction(\%myconfig, \%$form)) { # saving the history if(!exists $form->{addition} && $form->{id} ne "") { + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "POSTED"; $form->save_history($form->dbconnect(\%myconfig)); } @@ -1110,6 +1118,7 @@ sub post_as_new { $form->{postasnew} = 1; # saving the history if(!exists $form->{addition} && $form->{id} ne "") { + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "POSTED AS NEW"; $form->save_history($form->dbconnect(\%myconfig)); } @@ -1174,6 +1183,7 @@ sub yes { if (AR->delete_transaction(\%myconfig, \%$form, $spool)) { # saving the history if(!exists $form->{addition}) { + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "DELETED"; $form->save_history($form->dbconnect(\%myconfig)); } @@ -1221,7 +1231,7 @@ sub search { $form->{javascript} .= qq||; # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { @@ -1292,6 +1302,10 @@ sub search { | | . $locale->text('Order Number') . qq| | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| . $locale->text('Transaction description') . qq| | ++ | ||||||||||||||||
| . $locale->text('Notes') . qq| | @@ -1368,6 +1382,8 @@ sub search { | | . $locale->text('Subtotal') . qq| | | . $locale->text('Project Number') . qq| | ++ | | . $locale->text('Transaction description') . qq| |