shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, closed = ?,
delivered = ?, department_id = ?, language_id = ?, shipto_id = ?,
globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?,
- is_sales = ?
+ is_sales = ?, taxzone_id = ?, taxincluded = ?, terms = ?, curr = ?
WHERE id = ?|;
@values = ($form->{donumber}, $form->{ordnumber},
conv_i($form->{salesman_id}), conv_i($form->{cp_id}),
$form->{transaction_description},
$form->{type} =~ /^sales/ ? 't' : 'f',
+ conv_i($form->{taxzone_id}), $form->{taxincluded} ? 't' : 'f', conv_i($form->{terms}), $form->{curr},
conv_i($form->{id}));
do_query($form, $dbh, $query, @values);
dord.closed, dord.reqdate, dord.department_id, dord.cusordnumber,
d.description AS department, dord.language_id,
dord.shipto_id,
- dord.globalproject_id, dord.delivered, dord.transaction_description
+ dord.globalproject_id, dord.delivered, dord.transaction_description,
+ dort.taxzone_id, dord.taxincluded, dord.terms, dord.curr
FROM delivery_orders dord
JOIN ${vc} cv ON (dord.${vc}_id = cv.id)
LEFT JOIN employee e ON (dord.employee_id = e.id)
($form->{ $form->{vc} }) = split /--/, $form->{ $form->{vc} };
$form->{"old$form->{vc}"} = qq|$form->{$form->{vc}}--$form->{"$form->{vc}_id"}|;
- $form->{taxincluded} = $taxincluded if ($form->{id});
-
$form->{employee} = "$form->{employee}--$form->{employee_id}";
$form->{salesman_id} = $salesman_id if ($editing);
--- /dev/null
+-- @tag: delivery_orders_fields_for_invoices
+-- @description: Spalten in Lieferscheintabellen, um einige Werte von Aufträgen zu Rechnungen zu übernehmen
+-- @depends: release_2_6_0
+ALTER TABLE delivery_orders ADD COLUMN taxzone_id integer;
+ALTER TABLE delivery_orders ADD COLUMN taxincluded boolean;
+ALTER TABLE delivery_orders ADD COLUMN terms integer;
+ALTER TABLE delivery_orders ADD COLUMN curr char(3);
+
+UPDATE delivery_orders SET taxincluded = FALSE;
+
<input type="hidden" name="cc" value="[% HTML.escape(cc) %]">
<input type="hidden" name="closed" value="[% HTML.escape(closed) %]">
<input type="hidden" name="convert_from_oe_ids" value="[% HTML.escape(convert_from_oe_ids) %]">
+ <input type="hidden" name="curr" value="[% HTML.escape(curr) %]">
<input type="hidden" name="customer_klass" value="[% HTML.escape(customer_klass) %]">
<input type="hidden" name="discount" value="[% HTML.escape(discount) %]">
<input type="hidden" name="dunning_amount" value="[% HTML.escape(dunning_amount) %]">
<input type="hidden" name="shiptostreet" value="[% HTML.escape(shiptostreet) %]">
<input type="hidden" name="shiptozipcode" value="[% HTML.escape(shiptozipcode) %]">
<input type="hidden" name="subject" value="[% HTML.escape(subject) %]">
+ <input type="hidden" name="taxincluded" value="[% HTML.escape(taxincluded) %]">
+ <input type="hidden" name="taxzone_id" value="[% HTML.escape(taxzone_id) %]">
+ <input type="hidden" name="terms" value="[% HTML.escape(terms) %]">
<input type="hidden" name="title" value="[% HTML.escape(title) %]">
<input type="hidden" name="type" value="[% HTML.escape(type) %]">
<input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
<input type="hidden" name="cc" value="[% HTML.escape(cc) %]">
<input type="hidden" name="closed" value="[% HTML.escape(closed) %]">
<input type="hidden" name="convert_from_oe_ids" value="[% HTML.escape(convert_from_oe_ids) %]">
+ <input type="hidden" name="curr" value="[% HTML.escape(curr) %]">
<input type="hidden" name="customer_klass" value="[% HTML.escape(customer_klass) %]">
<input type="hidden" name="discount" value="[% HTML.escape(discount) %]">
<input type="hidden" name="dunning_amount" value="[% HTML.escape(dunning_amount) %]">
<input type="hidden" name="shiptostreet" value="[% HTML.escape(shiptostreet) %]">
<input type="hidden" name="shiptozipcode" value="[% HTML.escape(shiptozipcode) %]">
<input type="hidden" name="subject" value="[% HTML.escape(subject) %]">
+ <input type="hidden" name="taxincluded" value="[% HTML.escape(taxincluded) %]">
+ <input type="hidden" name="taxzone_id" value="[% HTML.escape(taxzone_id) %]">
+ <input type="hidden" name="terms" value="[% HTML.escape(terms) %]">
<input type="hidden" name="title" value="[% HTML.escape(title) %]">
<input type="hidden" name="type" value="[% HTML.escape(type) %]">
<input type="hidden" name="vc" value="[% HTML.escape(vc) %]">