X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fir.pl;h=77f911d1694070298505aea6f906317d6a89aa77;hb=3da2dca2e601b311b6e464ffff02bfe98a7024d1;hp=ca0e19f8d7a405a068d71653194871f2c4c7f818;hpb=848ff82dda324979b7958eaad58a9b84e38bb27e;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index ca0e19f8d..77f911d16 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -46,6 +46,7 @@ require "bin/mozilla/drafts.pl"; sub add { $lxdebug->enter_sub(); + $form->{"Watchdog::invdate,duedate,vendor,vendor_id"} = 1; return $lxdebug->leave_sub() if (load_draft_maybe()); @@ -220,6 +221,16 @@ sub form_header { s/option>\Q$form->{$item}\E/option selected>$form->{$item}/; } + if ($form->{old_employee_id}) { + $form->{employee_id} = $form->{old_employee_id}; + } + if ($form->{old_salesman_id}) { + $form->{salesman_id} = $form->{old_salesman_id}; + } + + $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); + + $form->{radier} = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0; @@ -858,7 +869,12 @@ sub form_footer { . qq|">|; } # /button for saving history - + # mark_as_paid button + if($form->{id} ne "") { + print qq||; + } + # /mark_as_paid button print qq| @@ -868,6 +884,12 @@ print qq| $lxdebug->leave_sub(); } +sub mark_as_paid { + $lxdebug->enter_sub(); + &mark_as_paid_common(\%myconfig,"ap"); + $lxdebug->leave_sub(); +} + sub update { $lxdebug->enter_sub(); @@ -1039,6 +1061,8 @@ sub use_as_template { sub post_payment { $lxdebug->enter_sub(); + + $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); for $i (1 .. $form->{paidaccounts}) { if ($form->{"paid_$i"}) { $datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig); @@ -1080,6 +1104,8 @@ sub post_payment { sub post { $lxdebug->enter_sub(); + $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); + $form->isblank("invdate", $locale->text('Invoice Date missing!')); $form->isblank("vendor", $locale->text('Vendor missing!')); @@ -1123,6 +1149,7 @@ sub post { ($form->{AP}) = split /--/, $form->{AP}; ($form->{AP_paid}) = split /--/, $form->{AP_paid}; + $form->{storno} = 0; $form->{id} = 0 if $form->{postasnew};