my $vc = $form->{vc} eq "customer" ? "customer" : "vendor";
$query =
- qq|SELECT dord.id, dord.donumber, dord.ordnumber, dord.oreqnumber, dord.transdate,
+ qq|SELECT dord.id, dord.donumber, dord.ordnumber, dord.transdate,
ct.name, dord.${vc}_id, dord.globalproject_id,
dord.closed, dord.delivered, dord.shippingpoint, dord.shipvia,
dord.transaction_description,
pr.projectnumber AS globalprojectnumber,
e.name AS employee,
sm.name AS salesman,
- oreq.id AS oreq_id,
oe.id AS oe_id
FROM delivery_orders dord
LEFT JOIN $vc ct ON (dord.${vc}_id = ct.id)
LEFT JOIN employee e ON (dord.employee_id = e.id)
LEFT JOIN employee sm ON (dord.salesman_id = sm.id)
LEFT JOIN project pr ON (dord.globalproject_id = pr.id)
- LEFT JOIN order_request oreq ON (dord.oreqnumber = oreq.oreqnumber)
LEFT JOIN oe ON ((dord.ordnumber = oe.ordnumber) AND NOT COALESCE(oe.quotation, FALSE))|;
push @where, ($form->{type} eq 'sales_delivery_order' ? '' : 'NOT ') . qq|COALESCE(dord.is_sales, FALSE)|;
"id" => "dord.id",
"donumber" => "dord.donumber",
"ordnumber" => "dord.ordnumber",
- "oreqnumber" => "dord.oreqnumber",
"name" => "ct.name",
"employee" => "e.name",
"salesman" => "sm.name",
id, delivery_order_id, parts_id, description, longdescription, qty, base_qty,
sellprice, discount, unit, reqdate, project_id, serialnumber,
ordnumber, transdate, cusordnumber,
- lastcost, price_factor_id, price_factor, marge_price_factor,
- v_partnumber, v_description)
+ lastcost, price_factor_id, price_factor, marge_price_factor)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
- (SELECT factor FROM price_factors WHERE id = ?), ?, ?, ?)|;
+ (SELECT factor FROM price_factors WHERE id = ?), ?)|;
my $h_item = prepare_query($form, $dbh, $q_item);
my $q_item_stock =
$form->{"cusordnumber_$i"},
$form->{"lastcost_$i"},
conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"price_factor_id_$i"}),
- conv_i($form->{"marge_price_factor_$i"}),
- $form->{"v_partnumber_$i"}, $form->{"v_description_$i"});
+ conv_i($form->{"marge_price_factor_$i"}));
do_statement($form, $h_item, $q_item, @values);
my $stock_info = DO->unpack_stock_information('packed' => $form->{"stock_${in_out}_$i"});
# save DO record
$query =
qq|UPDATE delivery_orders SET
- donumber = ?, ordnumber = ?, cusordnumber = ?, oreqnumber = ?, transdate = ?, vendor_id = ?,
+ donumber = ?, ordnumber = ?, cusordnumber = ?, transdate = ?, vendor_id = ?,
customer_id = ?, reqdate = ?,
shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, closed = ?,
delivered = ?, department_id = ?, language_id = ?, shipto_id = ?,
WHERE id = ?|;
@values = ($form->{donumber}, $form->{ordnumber},
- $form->{cusordnumber}, $form->{oreqnumber}, conv_date($form->{transdate}),
+ $form->{cusordnumber}, conv_date($form->{transdate}),
conv_i($form->{vendor_id}), conv_i($form->{customer_id}),
conv_date($reqdate), $form->{shippingpoint}, $form->{shipvia},
$form->{notes}, $form->{intnotes},
# so if any of these infos is important (or even different) for any item,
# it will be killed out and then has to be fetched from the item scope query further down
$query =
- qq|SELECT dord.cp_id, dord.donumber, dord.ordnumber, dord.oreqnumber, dord.transdate, dord.reqdate,
+ qq|SELECT dord.cp_id, dord.donumber, dord.ordnumber, dord.transdate, dord.reqdate,
dord.shippingpoint, dord.shipvia, dord.notes, dord.intnotes,
e.name AS employee, dord.employee_id, dord.salesman_id,
dord.${vc}_id, cv.name AS ${vc},
doi.reqdate, doi.project_id, doi.serialnumber, doi.lastcost,
doi.ordnumber, doi.transdate, doi.cusordnumber, doi.longdescription,
doi.price_factor_id, doi.price_factor, doi.marge_price_factor,
- doi.v_partnumber, doi.v_description,
pr.projectnumber,
pg.partsgroup
FROM delivery_order_items doi
qw(runningnumber number description longdescription qty unit
partnotes serialnumber reqdate projectnumber
si_runningnumber si_number si_description
- si_warehouse si_bin si_chargenumber si_qty si_unit
- v_partnumber v_description);
+ si_warehouse si_bin si_chargenumber si_qty si_unit);
my $sameitem = "";
foreach $item (sort { $a->[1] cmp $b->[1] } @partsgroup) {
push @{ $form->{serialnumber} }, $form->{"serialnumber_$i"};
push @{ $form->{reqdate} }, $form->{"reqdate_$i"};
push @{ $form->{projectnumber} }, $projectnumbers{$form->{"project_id_$i"}};
- push @{ $form->{v_partnumber} }, $form->{"v_partnumber_$i"};
- push @{ $form->{v_description} }, $form->{"v_description_$i"};
if ($form->{"assembly_$i"}) {
$sameitem = "";
my @columns = qw(
transdate
id donumber
- ordnumber oreqnumber
+ ordnumber
name employee
shipvia globalprojectnumber
transaction_description
'id' => { 'text' => $locale->text('ID'), },
'donumber' => { 'text' => $locale->text('Delivery Order'), },
'ordnumber' => { 'text' => $locale->text('Order'), },
- 'oreqnumber' => { 'text' => $locale->text('Order Request Number'), },
'name' => { 'text' => $form->{vc} eq 'customer' ? $locale->text('Customer') : $locale->text('Vendor'), },
'employee' => { 'text' => $locale->text('Salesperson'), },
'shipvia' => { 'text' => $locale->text('Ship via'), },
'delivered' => { 'text' => $locale->text('Delivered'), },
);
- foreach my $name (qw(id transdate donumber ordnumber oreqnumber name employee shipvia)) {
+ foreach my $name (qw(id transdate donumber ordnumber name employee shipvia)) {
$column_defs{$name}->{link} = $href . "&sort=$name";
}
my $edit_url = build_std_url('action=edit', 'type', 'vc');
my $edit_order_url = build_std_url('script=oe.pl', 'type=' . ($form->{type} eq 'sales_delivery_order' ? 'sales_order' : 'purchase_order'), 'action=edit');
- my $edit_oreq_url = build_std_url('script=pkoreq.pl', 'action=edit');
foreach $dord (@{ $form->{DO} }) {
$dord->{open} = $dord->{closed} ? $locale->text('No') : $locale->text('Yes');
my $row = { map { $_ => { 'data' => $dord->{$_} } } @columns };
- $row->{donumber}->{link} = $edit_url . "&id=" . E($dord->{id}) . "&callback=${callback}";
- $row->{ordnumber}->{link} = $edit_order_url . "&id=" . E($dord->{oe_id}) . "&callback=${callback}";
- $row->{oreqnumber}->{link} = $edit_oreq_url . "&id=" . E($dord->{oreq_id}) . "&callback=${callback}";
+ $row->{donumber}->{link} = $edit_url . "&id=" . E($dord->{id}) . "&callback=${callback}";
+ $row->{ordnumber}->{link} = $edit_order_url . "&id=" . E($dord->{oe_id}) . "&callback=${callback}";
$report->add_data($row);
}
'Last Credit Note Number' => 'Letzte Gutschriftnummer',
'Last Customer Number' => 'Letzte Kundennummer',
'Last Invoice Number' => 'Letzte Rechnungsnummer',
- 'Last Order Request Number' => 'Letzte Bestellanfragenummer',
'Last Purchase Delivery Order Number' => 'Letzte Lieferscheinnummer (Einkauf)',
'Last Purchase Order Number' => 'Letzte Lieferantenautragsnummer',
'Last RFQ Number' => 'Letzte Anfragenummer',
- 'Last Release Material Slip Number' => 'Letzte Materialausgabebelegsnummer',
- 'Last Return Material Slip Number' => 'Letzte Materialrückgabescheinnummer',
'Last Sales Delivery Order Number' => 'Letzte Lieferscheinnummer (Verkauf)',
'Last Sales Order Number' => 'Letzte Auftragsnummer',
'Last Sales Quotation Number' => 'Letzte Angebotsnummer',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number' => 'Auftragsnummer',
'Order Number missing!' => 'Auftragsnummer fehlt!',
- 'Order Request Number' => 'Bestellanfragenummer',
'Order deleted!' => 'Auftrag gelöscht!',
'Ordered' => 'Vom Kunde bestellt',
'Orientation' => 'Seitenformat',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number' => 'Auftragsnummer',
'Order Number missing!' => 'Auftragsnummer fehlt!',
- 'Order Request Number' => 'Bestellanfragenummer',
'Others' => 'Andere',
'PAYMENT POSTED' => 'Rechung gebucht',
'PDF' => 'PDF',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number' => 'Auftragsnummer',
'Order Number missing!' => 'Auftragsnummer fehlt!',
- 'Order Request Number' => 'Bestellanfragenummer',
'Order deleted!' => 'Auftrag gelöscht!',
'Other users\' follow-ups' => 'Wiedervorlagen anderer Benutzer',
'Others' => 'Andere',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number' => 'Auftragsnummer',
'Order Number missing!' => 'Auftragsnummer fehlt!',
- 'Order Request Number' => 'Bestellanfragenummer',
'Order deleted!' => 'Auftrag gelöscht!',
'Others' => 'Andere',
'PAYMENT POSTED' => 'Rechung gebucht',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number' => 'Auftragsnummer',
'Order Number missing!' => 'Auftragsnummer fehlt!',
- 'Order Request Number' => 'Bestellanfragenummer',
'Order deleted!' => 'Auftrag gelöscht!',
'Other users\' follow-ups' => 'Wiedervorlagen anderer Benutzer',
'Others' => 'Andere',
<td><input name="pdonumber" size="10" value="[% HTML.escape(defaults_pdonumber) %]"></td>
</tr>
- <tr>
- <th align="right" nowrap>Letzte Materialrückgabescheinnummer</th>
- <td><input name="rmsnumber" size="10" value="[% HTML.escape(defaults_rmsnumber) %]"></td>
- <th align="right" nowrap>Letzte Bestellanfragenummer</th>
- <td><input name="oreqnumber" size="10" value="[% HTML.escape(defaults_oreqnumber) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap>Letzte Materialausgabebelegsnummer</th>
- <td><input name="rlmsnumber" size="10" value="[% HTML.escape(defaults_rlmsnumber) %]"></td>
- </tr>
-
<tr class="listheading">
<th colspan="4">Standardkonten</th>
</tr>
<td><input name="pdonumber" size="10" value="[% HTML.escape(defaults_pdonumber) %]"></td>
</tr>
- <tr>
- <th align="right" nowrap><translate>Last Return Material Slip Number</translate></th>
- <td><input name="rmsnumber" size="10" value="[% HTML.escape(defaults_rmsnumber) %]"></td>
- <th align="right" nowrap><translate>Last Order Request Number</translate></th>
- <td><input name="oreqnumber" size="10" value="[% HTML.escape(defaults_oreqnumber) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap><translate>Last Release Material Slip Number</translate></th>
- <td><input name="rlmsnumber" size="10" value="[% HTML.escape(defaults_rlmsnumber) %]"></td>
- </tr>
-
<tr class="listheading">
<th colspan="4"><translate>Default Accounts</translate></th>
</tr>
<td><input name="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"[% RO %]></td>
</tr>
- [%- UNLESS is_customer %]
- <tr>
- <th width="70%" align="right" nowrap>Bestellanfragenummer</th>
- <td><input name="oreqnumber" size="11" value="[% HTML.escape(oreqnumber) %]"[% RO %]></td>
- </tr>
- [%- END %]
-
<tr>
<th align="right" nowrap>Lieferscheindatum</th>
<td nowrap>
<td><input name="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"[% RO %]></td>
</tr>
- [%- UNLESS is_customer %]
- <tr>
- <th width="70%" align="right" nowrap><translate>Order Request Number</translate></th>
- <td><input name="oreqnumber" size="11" value="[% HTML.escape(oreqnumber) %]"[% RO %]></td>
- </tr>
- [%- END %]
-
<tr>
<th align="right" nowrap><translate>Delivery Order Date</translate></th>
<td nowrap>
<td colspan="3"><input name="ordnumber" class="fixed_width"></td>
</tr>
- [%- UNLESS is_customer %]
- <tr>
- <th align="right">Bestellanfragenummer</th>
- <td colspan="3"><input name="oreqnumber" class="fixed_width"></td>
- </tr>
- [%- END %]
-
[%- IF ALL_DEPARTMENTS.size %]
<tr>
<th align="right" nowrap>Abteilung</th>
<input name="l_cusordnumber" id="l_cusordnumber" class="checkbox" type="checkbox" value="Y">
<label for="l_cusordnumber">Bestellnummer des Kunden</label>
</td>
-
- [%- UNLESS is_customer %]
- <td>
- <input name="l_oreqnumber" id="l_oreqnumber" class="checkbox" type="checkbox" value="Y" checked>
- <label for="l_oreqnumber">Bestellanfragenummer</label>
- </td>
- [%- END %]
</tr>
<tr>
<td colspan="3"><input name="ordnumber" class="fixed_width"></td>
</tr>
- [%- UNLESS is_customer %]
- <tr>
- <th align="right"><translate>Order Request Number</translate></th>
- <td colspan="3"><input name="oreqnumber" class="fixed_width"></td>
- </tr>
- [%- END %]
-
[%- IF ALL_DEPARTMENTS.size %]
<tr>
<th align="right" nowrap><translate>Department</translate></th>
<input name="l_cusordnumber" id="l_cusordnumber" class="checkbox" type="checkbox" value="Y">
<label for="l_cusordnumber"><translate>Customer Order Number</translate></label>
</td>
-
- [%- UNLESS is_customer %]
- <td>
- <input name="l_oreqnumber" id="l_oreqnumber" class="checkbox" type="checkbox" value="Y" checked>
- <label for="l_oreqnumber"><translate>Order Request Number</translate></label>
- </td>
- [%- END %]
</tr>
<tr>
<th width=70% align=right nowrap>Auftragsnummer</th>
<td><input name=ordnumber size=11 value="[% HTML.escape(ordnumber) %]"></td>
</tr>
-[%- END %]
-[%- IF is_pur_ord || is_req_quo %]
- <tr>
- <th width=70% align=right nowrap>Bestellanfragenummer</th>
- <td><input name=oreqnumber size=11 value="[% HTML.escape(oreqnumber) %]"></td>
- </tr>
[%- END %]
<tr>
<th width=70% align=right nowrap>[% IF is_req_quo %]Anfragenummer[% ELSE %]Angebotsnummer[% END %]</th>
<th width=70% align=right nowrap><translate>Order Number</translate></th>
<td><input name=ordnumber size=11 value="[% HTML.escape(ordnumber) %]"></td>
</tr>
-[%- END %]
-[%- IF is_pur_ord || is_req_quo %]
- <tr>
- <th width=70% align=right nowrap><translate>Order Request Number</translate></th>
- <td><input name=oreqnumber size=11 value="[% HTML.escape(oreqnumber) %]"></td>
- </tr>
[%- END %]
<tr>
<th width=70% align=right nowrap>[% IF is_req_quo %]<translate>RFQ Number</translate>[% ELSE %]<translate>Quotation Number</translate>[% END %]</th>