X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Far.pl;h=da33886a12e23d10b012e8775b6ddd919c30b36d;hb=3c5e4df9e938a8f2c9b045774bda00095b976e49;hp=8c7ab131fbfc4e30223fc9e4303348c944d2b214;hpb=55f47cfa6e043ae8d0c34b8a81daf4610f71f75a;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 8c7ab131f..da33886a1 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); @@ -102,7 +103,7 @@ sub edit { # show history button $form->{javascript} = qq||; #/show hhistory button - + $form->{javascript} .= qq||; $form->{title} = "Edit"; &create_links; @@ -136,6 +137,9 @@ sub create_links { $form->{oldcustomer} = "$form->{customer}--$form->{customer_id}"; $form->{rowcount} = 1; + # notes + $form->{notes} = $form->{intnotes} unless $form->{notes}; + # currencies @curr = split(/:/, $form->{currencies}); chomp $curr[0]; @@ -319,7 +323,7 @@ sub form_header { # show history button js $form->{javascript} .= qq||; #/show history button js - + $form->{javascript} .= qq||; $readonly = ($form->{id}) ? "readonly" : ""; $form->{radier} = @@ -385,7 +389,9 @@ sub form_header { $customer = ($form->{selectcustomer}) - ? qq|| + ? qq|| : qq||; $employee = qq| @@ -471,12 +477,12 @@ sub form_header { # with JavaScript Calendar $button1 = qq| - {transdate}> + text('button') . qq|> |; $button2 = qq| - {duedate}> + text('button') . qq|> |; @@ -489,15 +495,17 @@ sub form_header { # without JavaScript Calendar $button1 = - qq|{transdate}>|; + qq||; $button2 = - qq|{duedate}>|; + qq||; } $form->header; - + $onload = qq|focus()|; + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - +
{script}> @@ -782,12 +790,12 @@ $jsscript |; $column_data{paid} = - qq|{"paid_$i"}>|; + qq||; $column_data{AR_paid} = qq|${selectAR_paid}|; $column_data{exchangerate} = qq|$exchangerate|; $column_data{datepaid} = - qq|{"datepaid_$i"}> + qq| |; $column_data{source} = qq||; @@ -835,7 +843,6 @@ sub form_footer { -{path}> {login}> {password}> | @@ -846,10 +853,19 @@ sub form_footer {
|; + if (!$form->{id} && $form->{draft_id}) { + print(NTI($cgi->checkbox('-name' => 'remove_draft', '-id' => 'remove_draft', + '-value' => 1, '-checked' => $form->{remove_draft}, + '-label' => '')) . + qq| 
|); + } + $transdate = $form->datetonum($form->{transdate}, \%myconfig); $closedto = $form->datetonum($form->{closedto}, \%myconfig); - print qq| |; if ($form->{id}) { @@ -882,7 +898,7 @@ sub form_footer { } if ($form->{menubar}) { - require "$form->{path}/menu.pl"; + require "bin/mozilla/menu.pl"; &menubar; } # button for saving history @@ -1076,6 +1092,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)); } @@ -1094,6 +1111,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)); } @@ -1158,6 +1176,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)); } @@ -1201,7 +1220,9 @@ sub search { | if $form->{selectdepartment}; $form->{title} = $locale->text('AR Transactions'); - + + $form->{javascript} .= qq||; + # use JavaScript Calendar or not $form->{jsscript} = $jscalendar; $jsscript = ""; @@ -1209,12 +1230,12 @@ sub search { # with JavaScript Calendar $button1 = qq| - + text('button') . qq|> |; $button2 = qq| - + text('button') . qq|> |; @@ -1227,9 +1248,9 @@ sub search { # without JavaScript Calendar $button1 = qq| - |; + |; $button2 = qq| - |; + |; } $form->get_lists("projects" => { "key" => "ALL_PROJECTS", @@ -1247,9 +1268,11 @@ sub search { $form->{fokus} = "search.customer"; $form->header; - + $onload = qq|focus()|; + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - + {script}> @@ -1362,7 +1385,6 @@ sub search { {nextsub}> -{path}> {login}> {password}> @@ -1391,7 +1413,7 @@ sub ar_transactions { AR->ar_transactions(\%myconfig, \%$form); $callback = - "$form->{script}?action=ar_transactions&path=$form->{path}&login=$form->{login}&password=$form->{password}"; + "$form->{script}?action=ar_transactions&login=$form->{login}&password=$form->{password}"; $href = $callback; if ($form->{customer}) { @@ -1621,12 +1643,13 @@ sub ar_transactions { $module = ($ar->{invoice}) ? "is.pl" : $form->{script}; $column_data{invnumber} = - "{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ar->{invnumber}"; + "{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ar->{invnumber}"; $column_data{type} = "" . - ($ar->{storno} ? $locale->text("Storno (one letter abbreviation)") : - $ar->{amount} < 0 ? - $locale->text("Credit note (one letter abbreviation)") : - $locale->text("Invoice (one letter abbreviation)")) . ""; + ($ar->{storno} ? $locale->text("Storno (one letter abbreviation)") : + $ar->{amount} < 0 ? $locale->text("Credit note (one letter abbreviation)") : + $ar->{invoice} ? $locale->text("Invoice (one letter abbreviation)") : + $locale->text("AR Transaction (abbreviation)")) + . ""; $column_data{ordnumber} = "$ar->{ordnumber} "; $column_data{name} = "$ar->{name}"; $ar->{notes} =~ s/\r\n/
/g; @@ -1696,7 +1719,6 @@ sub ar_transactions { -{path}> {login}> {password}>