Revision ba629467
Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt
bin/mozilla/ap.pl | ||
---|---|---|
141 | 141 |
if ($template->vendor) { |
142 | 142 |
$::form->{vendor_id} = $template->vendor_id; |
143 | 143 |
$::form->{vendor} = $template->vendor->name; |
144 |
$::form->{duedate} = $template->vendor->payment->calc_date(reference_date => $today)->to_kivitendo if $template->vendor->payment;
|
|
144 |
$::form->{duedate} = $template->vendor->payment->calc_date(reference_date => $today)->to_kivitendo if $template->vendor->payment; |
|
145 | 145 |
} |
146 | 146 |
|
147 | 147 |
my $row = 0; |
... | ... | |
206 | 206 |
} (1..($::form->{rowcount} || 1)); |
207 | 207 |
|
208 | 208 |
$template->assign_attributes( |
209 |
template_type => 'ap_transaction', |
|
210 |
template_name => $new_name, |
|
211 |
|
|
212 |
currency_id => SL::DB::Manager::Currency->find_by(name => $::form->{currency})->id, |
|
213 |
ar_ap_chart_id => $::form->{AP_chart_id} || undef, |
|
214 |
vendor_id => $::form->{vendor_id} || undef, |
|
215 |
department_id => $::form->{department_id} || undef, |
|
216 |
project_id => $::form->{globalproject_id} || undef, |
|
217 |
payment_id => $::form->{payment_id} || undef, |
|
218 |
taxincluded => $::form->{taxincluded} ? 1 : 0, |
|
219 |
direct_debit => $::form->{direct_debit} ? 1 : 0, |
|
220 |
ordnumber => $::form->{ordnumber}, |
|
221 |
notes => $::form->{notes}, |
|
209 |
template_type => 'ap_transaction',
|
|
210 |
template_name => $new_name,
|
|
211 |
|
|
212 |
currency_id => SL::DB::Manager::Currency->find_by(name => $::form->{currency})->id,
|
|
213 |
ar_ap_chart_id => $::form->{AP_chart_id} || undef,
|
|
214 |
vendor_id => $::form->{vendor_id} || undef,
|
|
215 |
department_id => $::form->{department_id} || undef,
|
|
216 |
project_id => $::form->{globalproject_id} || undef,
|
|
217 |
payment_id => $::form->{payment_id} || undef,
|
|
218 |
taxincluded => $::form->{taxincluded} ? 1 : 0,
|
|
219 |
direct_debit => $::form->{direct_debit} ? 1 : 0,
|
|
220 |
ordnumber => $::form->{ordnumber},
|
|
221 |
notes => $::form->{notes},
|
|
222 | 222 |
transaction_description => $::form->{transaction_description}, |
223 | 223 |
|
224 |
items => \@items, |
|
224 |
items => \@items,
|
|
225 | 225 |
); |
226 | 226 |
|
227 | 227 |
eval { |
... | ... | |
1241 | 1241 |
return if $order->type ne 'purchase_order'; |
1242 | 1242 |
|
1243 | 1243 |
my $today = DateTime->today_local; |
1244 |
$::form->{title} = "Add"; |
|
1245 |
$::form->{vc} = 'vendor'; |
|
1246 |
$::form->{vendor_id} = $order->customervendor->id; |
|
1247 |
$::form->{vendor} = $order->vendor->name; |
|
1248 |
$::form->{convert_from_oe_id} = $order->id; |
|
1249 |
$::form->{globalproject_id} = $order->globalproject_id; |
|
1250 |
$::form->{ordnumber} = $order->number; |
|
1251 |
$::form->{department_id} = $order->department_id; |
|
1244 |
$::form->{title} = "Add";
|
|
1245 |
$::form->{vc} = 'vendor';
|
|
1246 |
$::form->{vendor_id} = $order->customervendor->id;
|
|
1247 |
$::form->{vendor} = $order->vendor->name;
|
|
1248 |
$::form->{convert_from_oe_id} = $order->id;
|
|
1249 |
$::form->{globalproject_id} = $order->globalproject_id;
|
|
1250 |
$::form->{ordnumber} = $order->number;
|
|
1251 |
$::form->{department_id} = $order->department_id;
|
|
1252 | 1252 |
$::form->{transaction_description} = $order->transaction_description; |
1253 |
$::form->{currency} = $order->currency->name; |
|
1254 |
$::form->{taxincluded} = 1; # we use amount below, so tax is included |
|
1255 |
$::form->{transdate} = $today->to_kivitendo; |
|
1256 |
$::form->{duedate} = $today->to_kivitendo; |
|
1257 |
$::form->{duedate} = $order->payment_terms->calc_date(reference_date => $today)->to_kivitendo if $order->payment_terms; |
|
1258 |
$::form->{deliverydate} = $order->reqdate->to_kivitendo if $order->reqdate; |
|
1253 |
$::form->{currency} = $order->currency->name;
|
|
1254 |
$::form->{taxincluded} = 1; # we use amount below, so tax is included
|
|
1255 |
$::form->{transdate} = $today->to_kivitendo;
|
|
1256 |
$::form->{duedate} = $today->to_kivitendo;
|
|
1257 |
$::form->{duedate} = $order->payment_terms->calc_date(reference_date => $today)->to_kivitendo if $order->payment_terms;
|
|
1258 |
$::form->{deliverydate} = $order->reqdate->to_kivitendo if $order->reqdate;
|
|
1259 | 1259 |
create_links(); |
1260 | 1260 |
|
1261 | 1261 |
my $config_po_ap_workflow_chart_id = $::instance_conf->get_workflow_po_ap_chart_id; |
Auch abrufbar als: Unified diff
Kosmetik Kreditorenbuchung ap.pl: Ausrichtung