Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 95c89ea0

Von Sven Schöling vor etwa 3 Jahren hinzugefügt

  • ID 95c89ea07b3052e6f7ebcb1a9e428a76f2232d00
  • Vorgänger d53d5323
  • Nachfolger 13286bfa

Lieferschein: Suche angepasst auf neue Typen

Unterschiede anzeigen:

SL/DO.pm
use SL::Common;
use SL::CVar;
use SL::DB::DeliveryOrder;
use SL::DB::DeliveryOrder::TypeData qw(:types is_valid_type);
use SL::DB::Status;
use SL::DBUtils;
use SL::Helper::ShippedQty;
......
dord.transaction_description, dord.itime::DATE AS insertdate,
pr.projectnumber AS globalprojectnumber,
dep.description AS department,
dord.order_type,
e.name AS employee,
sm.name AS salesman
FROM delivery_orders dord
......
LEFT JOIN department dep ON (dord.department_id = dep.id)
|;
push @where, ($form->{type} eq 'sales_delivery_order' ? '' : 'NOT ') . qq|COALESCE(dord.is_sales, FALSE)|;
if ($form->{type} && is_valid_type($form->{type})) {
push @where, 'dord.order_type = ?';
push @values, $form->{type};
}
if ($form->{department_id}) {
push @where, qq|dord.department_id = ?|;
......
shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, closed = ?,
delivered = ?, department_id = ?, language_id = ?, shipto_id = ?, billing_address_id = ?,
globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?,
is_sales = ?, taxzone_id = ?, taxincluded = ?, payment_id = ?, currency_id = (SELECT id FROM currencies WHERE name = ?),
order_type = ?, taxzone_id = ?, taxincluded = ?, payment_id = ?, currency_id = (SELECT id FROM currencies WHERE name = ?),
delivery_term_id = ?
WHERE id = ?|;
......
conv_i($form->{globalproject_id}), conv_i($form->{employee_id}),
conv_i($form->{salesman_id}), conv_i($form->{cp_id}),
$form->{transaction_description},
$form->{type} =~ /^sales/ ? 't' : 'f',
$form->{type} =~ /^sales/ ? SALES_DELIVERY_ORDER_TYPE : PURCHASE_DELIVERY_ORDER_TYPE,
conv_i($form->{taxzone_id}), $form->{taxincluded} ? 't' : 'f', conv_i($form->{payment_id}), $form->{currency},
conv_i($form->{delivery_term_id}),
conv_i($form->{id}));

Auch abrufbar als: Unified diff