Revision 092d3110
Von Sven Schöling vor fast 3 Jahren hinzugefügt
SL/DB/DeliveryOrder/TypeData.pm | ||
---|---|---|
37 | 37 |
save_and_ap_transaction => 0, |
38 | 38 |
save_and_invoice => 0, |
39 | 39 |
delete => sub { $::instance_conf->get_sales_delivery_order_show_delete }, |
40 |
new_controller => 0, |
|
40 | 41 |
}, |
41 | 42 |
properties => { |
42 | 43 |
customervendor => "customer", |
... | ... | |
65 | 66 |
save_and_ap_transaction => 0, |
66 | 67 |
save_and_invoice => 0, |
67 | 68 |
delete => sub { $::instance_conf->get_sales_delivery_order_show_delete }, |
69 |
new_controller => 0, |
|
68 | 70 |
}, |
69 | 71 |
properties => { |
70 | 72 |
customervendor => "vendor", |
... | ... | |
93 | 95 |
save_and_ap_transaction => 0, |
94 | 96 |
save_and_invoice => 0, |
95 | 97 |
delete => sub { $::instance_conf->get_sales_delivery_order_show_delete }, |
98 |
new_controller => 1, |
|
96 | 99 |
}, |
97 | 100 |
properties => { |
98 | 101 |
customervendor => "vendor", |
... | ... | |
121 | 124 |
save_and_ap_transaction => 0, |
122 | 125 |
save_and_invoice => 0, |
123 | 126 |
delete => sub { $::instance_conf->get_sales_delivery_order_show_delete }, |
127 |
new_controller => 1, |
|
124 | 128 |
}, |
125 | 129 |
properties => { |
126 | 130 |
customervendor => "customer", |
SL/DO.pm | ||
---|---|---|
42 | 42 |
use SL::Common; |
43 | 43 |
use SL::CVar; |
44 | 44 |
use SL::DB::DeliveryOrder; |
45 |
use SL::DB::DeliveryOrder::TypeData qw(:types is_valid_type); |
|
45 | 46 |
use SL::DB::Status; |
46 | 47 |
use SL::DBUtils; |
47 | 48 |
use SL::Helper::ShippedQty; |
... | ... | |
79 | 80 |
dord.transaction_description, dord.itime::DATE AS insertdate, |
80 | 81 |
pr.projectnumber AS globalprojectnumber, |
81 | 82 |
dep.description AS department, |
83 |
dord.order_type, |
|
82 | 84 |
e.name AS employee, |
83 | 85 |
sm.name AS salesman |
84 | 86 |
FROM delivery_orders dord |
... | ... | |
90 | 92 |
LEFT JOIN department dep ON (dord.department_id = dep.id) |
91 | 93 |
|; |
92 | 94 |
|
93 |
push @where, ($form->{type} eq 'sales_delivery_order' ? '' : 'NOT ') . qq|COALESCE(dord.is_sales, FALSE)|; |
|
95 |
if ($form->{type} && is_valid_type($form->{type})) { |
|
96 |
push @where, 'dord.order_type = ?'; |
|
97 |
push @values, $form->{type}; |
|
98 |
} |
|
94 | 99 |
|
95 | 100 |
if ($form->{department_id}) { |
96 | 101 |
push @where, qq|dord.department_id = ?|; |
... | ... | |
515 | 520 |
shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, closed = ?, |
516 | 521 |
delivered = ?, department_id = ?, language_id = ?, shipto_id = ?, billing_address_id = ?, |
517 | 522 |
globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?, |
518 |
is_sales = ?, taxzone_id = ?, taxincluded = ?, payment_id = ?, currency_id = (SELECT id FROM currencies WHERE name = ?),
|
|
523 |
order_type = ?, taxzone_id = ?, taxincluded = ?, payment_id = ?, currency_id = (SELECT id FROM currencies WHERE name = ?),
|
|
519 | 524 |
delivery_term_id = ? |
520 | 525 |
WHERE id = ?|; |
521 | 526 |
|
... | ... | |
529 | 534 |
conv_i($form->{globalproject_id}), conv_i($form->{employee_id}), |
530 | 535 |
conv_i($form->{salesman_id}), conv_i($form->{cp_id}), |
531 | 536 |
$form->{transaction_description}, |
532 |
$form->{type} =~ /^sales/ ? 't' : 'f',
|
|
537 |
$form->{type} =~ /^sales/ ? SALES_DELIVERY_ORDER_TYPE : PURCHASE_DELIVERY_ORDER_TYPE,
|
|
533 | 538 |
conv_i($form->{taxzone_id}), $form->{taxincluded} ? 't' : 'f', conv_i($form->{payment_id}), $form->{currency}, |
534 | 539 |
conv_i($form->{delivery_term_id}), |
535 | 540 |
conv_i($form->{id})); |
bin/mozilla/do.pl | ||
---|---|---|
36 | 36 |
use List::Util qw(max sum); |
37 | 37 |
use POSIX qw(strftime); |
38 | 38 |
|
39 |
use SL::Controller::DeliveryOrder; |
|
39 | 40 |
use SL::DB::DeliveryOrder; |
41 |
use SL::DB::DeliveryOrder::TypeData qw(:types validate_type); |
|
40 | 42 |
use SL::DO; |
41 | 43 |
use SL::IR; |
42 | 44 |
use SL::IS; |
... | ... | |
56 | 58 |
# end of main |
57 | 59 |
|
58 | 60 |
sub check_do_access { |
59 |
$main::auth->assert($main::form->{type} . '_edit'); |
|
61 |
validate_type($::form->{type}); |
|
62 |
|
|
63 |
my $right = SL::DB::DeliveryOrder::TypeData::get($::form->{type}, "right"); |
|
64 |
$main::auth->assert($right); |
|
60 | 65 |
} |
61 | 66 |
|
62 | 67 |
sub set_headings { |
... | ... | |
887 | 892 |
'align' => 'center', |
888 | 893 |
}; |
889 | 894 |
|
890 |
$row->{donumber}->{link} = $edit_url . "&id=" . E($dord->{id}) . "&callback=${callback}"; |
|
895 |
$row->{donumber}->{link} = SL::DB::DeliveryOrder::TypeData::get3($dord->{order_type}, "show_menu", "new_controller") |
|
896 |
? SL::Controller::DeliveryOrder->url_for(action => "edit", id => $dord->{id}, type => $dord->{order_type}) |
|
897 |
: $edit_url . "&id=" . E($dord->{id}) . "&callback=${callback}"; |
|
891 | 898 |
$row->{ordnumber}->{link} = $edit_order_url . "&id=" . E($dord->{oe_id}) . "&callback=${callback}" if $dord->{oe_id}; |
892 | 899 |
$report->add_data($row); |
893 | 900 |
|
menus/user/00-erp.yaml | ||
---|---|---|
470 | 470 |
params: |
471 | 471 |
action: search |
472 | 472 |
type: purchase_delivery_order |
473 |
- parent: ap_reports |
|
474 |
id: ap_reports_delivery_orders |
|
475 |
name: Supplier Delivery Orders |
|
476 |
order: 350 |
|
477 |
access: purchase_delivery_order_edit |
|
478 |
module: do.pl |
|
479 |
params: |
|
480 |
action: search |
|
481 |
type: supplier_delivery_order |
|
473 | 482 |
- parent: ap_reports |
474 | 483 |
id: ap_reports_vendor_invoices_ap_transactions |
475 | 484 |
name: Vendor Invoices & AP Transactions |
Auch abrufbar als: Unified diff
Lieferschein: Suche angepasst auf neue Typen