Revision 27e3ec0d
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/Controller/Reclamation.pm | ||
---|---|---|
1285 | 1285 |
}, |
1286 | 1286 |
id => t8('ID'), |
1287 | 1287 |
record_number => t8('Reclamation Number'), |
1288 |
employee_id => t8('Employee'),
|
|
1289 |
salesman_id => t8('Salesman'),
|
|
1290 |
customer_id => t8('Customer'),
|
|
1291 |
vendor_id => t8('Vendor'),
|
|
1292 |
contact_id => t8('Contact'),
|
|
1293 |
language_id => t8('Language'),
|
|
1294 |
department_id => t8('Department'),
|
|
1295 |
globalproject_id => t8('Project Number'),
|
|
1288 |
employee => t8('Employee'),
|
|
1289 |
salesman => t8('Salesman'),
|
|
1290 |
customer => t8('Customer'),
|
|
1291 |
vendor => t8('Vendor'),
|
|
1292 |
contact => t8('Contact'),
|
|
1293 |
language => t8('Language'),
|
|
1294 |
department => t8('Department'),
|
|
1295 |
globalproject => t8('Project Number'),
|
|
1296 | 1296 |
cv_record_number => ($self->type eq 'sales_reclamation' ? t8('Customer Record Number') : t8('Vendor Record Number')), |
1297 | 1297 |
transaction_description => t8('Description'), |
1298 | 1298 |
notes => t8('Notes'), |
... | ... | |
1302 | 1302 |
shipto_id => t8('Shipping Address'), |
1303 | 1303 |
amount => t8('Total'), |
1304 | 1304 |
netamount => t8('Subtotal'), |
1305 |
delivery_term_id => t8('Delivery Terms'),
|
|
1306 |
payment_id => t8('Payment Terms'),
|
|
1307 |
currency_id => t8('Currency'),
|
|
1305 |
delivery_term => t8('Delivery Terms'),
|
|
1306 |
payment => t8('Payment Terms'),
|
|
1307 |
currency => t8('Currency'),
|
|
1308 | 1308 |
exchangerate => t8('Exchangerate'), |
1309 | 1309 |
taxincluded => t8('Tax Included'), |
1310 |
taxzone_id => t8('Tax zone'),
|
|
1310 |
taxzone => t8('Tax zone'),
|
|
1311 | 1311 |
tax_point => t8('Tax point'), |
1312 | 1312 |
reqdate => t8('Deadline'), |
1313 | 1313 |
transdate => t8('Booking Date'), |
... | ... | |
1322 | 1322 |
(employee_id => SL::DB::Manager::Employee->current->id) x ($self->reclamation->is_sales && !$::auth->assert('sales_all_edit', 1)), |
1323 | 1323 |
(employee_id => SL::DB::Manager::Employee->current->id) x (!$self->reclamation->is_sales && !$::auth->assert('purchase_all_edit', 1)), |
1324 | 1324 |
], |
1325 |
); |
|
1325 |
|
|
1326 |
with_objects => [ |
|
1327 |
'customer', 'vendor', 'employee', 'salesman', |
|
1328 |
'contact', 'language', 'department', 'globalproject', |
|
1329 |
'delivery_term', 'payment', 'currency', 'taxzone', |
|
1330 |
], |
|
1331 |
); |
|
1326 | 1332 |
} |
1327 | 1333 |
|
1328 | 1334 |
sub init_p { |
... | ... | |
1941 | 1947 |
my @columns_order = qw( |
1942 | 1948 |
id |
1943 | 1949 |
record_number |
1944 |
employee_id
|
|
1945 |
salesman_id
|
|
1946 |
customer_id
|
|
1947 |
vendor_id
|
|
1948 |
contact_id
|
|
1949 |
language_id
|
|
1950 |
department_id
|
|
1951 |
globalproject_id
|
|
1950 |
employee |
|
1951 |
salesman |
|
1952 |
customer |
|
1953 |
vendor |
|
1954 |
contact |
|
1955 |
language |
|
1956 |
department |
|
1957 |
globalproject |
|
1952 | 1958 |
cv_record_number |
1953 | 1959 |
transaction_description |
1954 | 1960 |
notes |
... | ... | |
1957 | 1963 |
shipvia |
1958 | 1964 |
amount |
1959 | 1965 |
netamount |
1960 |
delivery_term_id
|
|
1961 |
payment_id
|
|
1962 |
currency_id
|
|
1966 |
delivery_term |
|
1967 |
payment |
|
1968 |
currency |
|
1963 | 1969 |
exchangerate |
1964 | 1970 |
taxincluded |
1965 |
taxzone_id
|
|
1971 |
taxzone |
|
1966 | 1972 |
tax_point |
1967 | 1973 |
reqdate |
1968 | 1974 |
transdate |
... | ... | |
1974 | 1980 |
|
1975 | 1981 |
my @default_columns = qw( |
1976 | 1982 |
record_number |
1977 |
employee_id
|
|
1978 |
department_id
|
|
1979 |
globalproject_id
|
|
1983 |
employee |
|
1984 |
department |
|
1985 |
globalproject |
|
1980 | 1986 |
cv_record_number |
1981 | 1987 |
transaction_description |
1982 | 1988 |
amount |
... | ... | |
1997 | 2003 |
obj_link => sub {$self->url_for(action => 'edit', id => $_[0]->id, type => $self->type, callback => $callback)}, |
1998 | 2004 |
sub => sub { $_[0]->record_number }, |
1999 | 2005 |
}, |
2000 |
employee_id => {
|
|
2006 |
employee => { |
|
2001 | 2007 |
sub => sub { $_[0]->employee ? $_[0]->employee->name : '' }, |
2002 | 2008 |
}, |
2003 |
salesman_id => {
|
|
2009 |
salesman => { |
|
2004 | 2010 |
sub => sub { $_[0]->salesman ? $_[0]->salesman->name : '' }, |
2005 | 2011 |
}, |
2006 |
language_id => {
|
|
2012 |
language => { |
|
2007 | 2013 |
sub => sub { $_[0]->language ? $_[0]->language->article_code : '' }, |
2008 | 2014 |
}, |
2009 |
department_id => {
|
|
2015 |
department => { |
|
2010 | 2016 |
sub => sub { $_[0]->department ? $_[0]->department->description : '' }, |
2011 | 2017 |
}, |
2012 |
globalproject_id => {
|
|
2018 |
globalproject => { |
|
2013 | 2019 |
obj_link => sub { $_[0]->globalproject_id ? |
2014 | 2020 |
$self->url_for( |
2015 | 2021 |
controller => "controller.pl", |
... | ... | |
2047 | 2053 |
netamount => { |
2048 | 2054 |
sub => sub { $_[0]->netamount_as_number }, |
2049 | 2055 |
}, |
2050 |
delivery_term_id => {
|
|
2056 |
delivery_term => { |
|
2051 | 2057 |
obj_link => sub { $_[0]->delivery_term_id ? |
2052 | 2058 |
$self->url_for( |
2053 | 2059 |
controller => "controller.pl", |
... | ... | |
2057 | 2063 |
) : '' }, |
2058 | 2064 |
sub => sub { $_[0]->delivery_term ? $_[0]->delivery_term->description : '' }, |
2059 | 2065 |
}, |
2060 |
payment_id => {
|
|
2066 |
payment => { |
|
2061 | 2067 |
obj_link => sub { $_[0]->payment_id ? |
2062 | 2068 |
$self->url_for( |
2063 | 2069 |
controller => "controller.pl", |
... | ... | |
2067 | 2073 |
) : '' }, |
2068 | 2074 |
sub => sub { $_[0]->payment ? $_[0]->payment->description : '' }, |
2069 | 2075 |
}, |
2070 |
currency_id => {
|
|
2076 |
currency => { |
|
2071 | 2077 |
sub => sub { $_[0]->currency ? $_[0]->currency->name : '' }, |
2072 | 2078 |
}, |
2073 | 2079 |
exchangerate => { |
... | ... | |
2076 | 2082 |
taxincluded => { |
2077 | 2083 |
sub => sub { $_[0]->taxincluded ? t8('Yes') : t8('No') }, |
2078 | 2084 |
}, |
2079 |
taxzone_id => {
|
|
2085 |
taxzone => { |
|
2080 | 2086 |
obj_link => sub { $_[0]->taxzone_id ? |
2081 | 2087 |
$self->url_for( |
2082 | 2088 |
controller => "controller.pl", |
... | ... | |
2109 | 2115 |
}, |
2110 | 2116 |
); |
2111 | 2117 |
if ($self->type eq sales_reclamation_type()) { |
2112 |
$column_defs{customer_id} = ({
|
|
2118 |
$column_defs{customer} = ({ |
|
2113 | 2119 |
raw_data => sub { $_[0]->customervendor->presenter->customer(display => 'table-cell', callback => $callback) }, |
2114 | 2120 |
sub => sub { $_[0]->customervendor->name }, |
2115 | 2121 |
}); |
2116 |
$column_defs{contact_id} = ({
|
|
2122 |
$column_defs{contact} = ({ |
|
2117 | 2123 |
obj_link => sub { $self->url_for( |
2118 | 2124 |
controller => "controller.pl", |
2119 | 2125 |
action => 'CustomerVendor/edit', |
... | ... | |
2124 | 2130 |
sub => sub { $_[0]->contact ? $_[0]->contact->cp_name : '' }, |
2125 | 2131 |
}); |
2126 | 2132 |
} elsif ($self->type eq purchase_reclamation_type()) { |
2127 |
$column_defs{vendor_id} = ({
|
|
2133 |
$column_defs{vendor} = ({ |
|
2128 | 2134 |
raw_data => sub { $_[0]->customervendor->presenter->vendor(display => 'table-cell', callback => $callback) }, |
2129 | 2135 |
sub => sub { $_[0]->customervendor->name }, |
2130 | 2136 |
}); |
2131 |
$column_defs{contact_id} = ({
|
|
2137 |
$column_defs{contact} = ({ |
|
2132 | 2138 |
obj_link => sub { $self->url_for( |
2133 | 2139 |
controller => "controller.pl", |
2134 | 2140 |
action => 'CustomerVendor/edit', |
SL/DB/Manager/Reclamation.pm | ||
---|---|---|
47 | 47 |
customer => 'lower(customer.name)', |
48 | 48 |
vendor => 'lower(vendor.name)', |
49 | 49 |
employee => 'lower(employee.name)', |
50 |
salesman => 'lower(salesman.name)', |
|
51 |
contact => 'lower(contact.cp_name)', |
|
52 |
language => 'lower(language.article_code)', |
|
53 |
department => 'lower(department.description)', |
|
50 | 54 |
globalprojectnumber => 'lower(globalproject.projectnumber)', |
55 |
delivery_term => 'lower(delivery_term.description)', |
|
56 |
payment => 'lower(payment.description)', |
|
57 |
currency => 'lower(currency.name)', |
|
58 |
taxzone => 'lower(taxzone.description)', |
|
51 | 59 |
|
52 | 60 |
# Bug in Rose::DB::Object: the next should be |
53 | 61 |
# "globalproject.project_type.description". This workaround will |
SL/Presenter/ReclamationFilter.pm | ||
---|---|---|
33 | 33 |
'input_name' => 'filter.id:number', |
34 | 34 |
'input_default' =>$filter->{'id:number'}, |
35 | 35 |
'report_id' => 'id', |
36 |
'active' => 1,
|
|
36 |
'active' => 0,
|
|
37 | 37 |
}, |
38 | 38 |
'record_number' => { |
39 | 39 |
'position' => 3, |
... | ... | |
44 | 44 |
'report_id' => 'record_number', |
45 | 45 |
'active' => 1, |
46 | 46 |
}, |
47 |
'employee_name' => {
|
|
47 |
'employee' => { |
|
48 | 48 |
'position' => 4, |
49 | 49 |
'text' => t8("Employee Name"), |
50 | 50 |
'input_type' => 'input_tag', |
51 | 51 |
'input_name' => 'filter.employee.name:substr::ilike', |
52 | 52 |
'input_default' =>$filter->{employee}->{'name:substr::ilike'}, |
53 |
'report_id' => 'employee_id',
|
|
53 |
'report_id' => 'employee', |
|
54 | 54 |
'active' => 1, |
55 | 55 |
}, |
56 |
'salesman_name' => {
|
|
56 |
'salesman' => { |
|
57 | 57 |
'position' => 5, |
58 | 58 |
'text' => t8("Salesman Name"), |
59 | 59 |
'input_type' => 'input_tag', |
60 | 60 |
'input_name' => 'filter.salesman.name:substr::ilike', |
61 | 61 |
'input_default' =>$filter->{salesman}->{'name:substr::ilike'}, |
62 |
'report_id' => 'salesman_id',
|
|
62 |
'report_id' => 'salesman', |
|
63 | 63 |
'active' => 1, |
64 | 64 |
}, |
65 | 65 |
# 6,7 for Customer/Vendor |
66 |
'customer_name' => {
|
|
66 |
'customer' => { |
|
67 | 67 |
'position' => 6, |
68 | 68 |
'text' => t8("Customer Name"), |
69 | 69 |
'input_type' => 'input_tag', |
70 | 70 |
'input_name' => 'filter.customer.name:substr::ilike', |
71 | 71 |
'input_default' => $filter->{customer}->{'name:substr::ilike'}, |
72 |
'report_id' => 'customer_id',
|
|
72 |
'report_id' => 'customer', |
|
73 | 73 |
'active' => ($reclamation_type eq 'sales_reclamation' ? 1 : 0), |
74 | 74 |
}, |
75 |
'vendor_name' => {
|
|
75 |
'vendor' => { |
|
76 | 76 |
'position' => 6, |
77 |
'text' => t8("Vendor"), |
|
77 |
'text' => t8("Vendor Name"),
|
|
78 | 78 |
'input_type' => 'input_tag', |
79 | 79 |
'input_name' => 'filter.vendor.name:substr::ilike', |
80 | 80 |
'input_default' => $filter->{vendor}->{'name:substr::ilike'}, |
81 |
'report_id' => 'vendor_id',
|
|
81 |
'report_id' => 'vendor', |
|
82 | 82 |
'active' => ($reclamation_type eq 'purchase_reclamation' ? 1 : 0), |
83 | 83 |
}, |
84 | 84 |
'customer_number' => { |
... | ... | |
103 | 103 |
'input_type' => 'input_tag', |
104 | 104 |
'input_name' => 'filter.contact.cp_name:substr::ilike', |
105 | 105 |
'input_default' =>$filter->{contact}->{'cp_name:substr::ilike'}, |
106 |
'report_id' => 'contact_id',
|
|
106 |
'report_id' => 'contact', |
|
107 | 107 |
'active' => 1, |
108 | 108 |
}, |
109 | 109 |
'language_code' => { |
... | ... | |
112 | 112 |
'input_type' => 'input_tag', |
113 | 113 |
'input_name' => 'filter.language.article_code:substr::ilike', |
114 | 114 |
'input_default' =>$filter->{language}->{'article_code:substr::ilike'}, |
115 |
'report_id' => 'language_id',
|
|
115 |
'report_id' => 'language', |
|
116 | 116 |
'active' => 1, |
117 | 117 |
}, |
118 | 118 |
'department_description' => { |
... | ... | |
121 | 121 |
'input_type' => 'input_tag', |
122 | 122 |
'input_name' => 'filter.department.description:substr::ilike', |
123 | 123 |
'input_default' =>$filter->{department}->{'description:substr::ilike'}, |
124 |
'report_id' => 'department_id',
|
|
124 |
'report_id' => 'department', |
|
125 | 125 |
'active' => 1, |
126 | 126 |
}, |
127 | 127 |
'globalproject_projectnumber' => { |
... | ... | |
130 | 130 |
'input_type' => 'input_tag', |
131 | 131 |
'input_name' => 'filter.globalproject.projectnumber:substr::ilike', |
132 | 132 |
'input_default' =>$filter->{globalproject}->{'projectnumber:substr::ilike'}, |
133 |
'report_id' => 'globalproject_id',
|
|
133 |
'report_id' => 'globalproject', |
|
134 | 134 |
'active' => 1, |
135 | 135 |
}, |
136 | 136 |
'globalproject_description' => { |
... | ... | |
222 | 222 |
'input_type' => 'input_tag', |
223 | 223 |
'input_name' => 'filter.delivery_term.description:substr::ilike', |
224 | 224 |
'input_default' =>$filter->{delivery_term}->{'description:substr::ilike'}, |
225 |
'report_id' => 'delivery_term_id',
|
|
225 |
'report_id' => 'delivery_term', |
|
226 | 226 |
'active' => 1, |
227 | 227 |
}, |
228 | 228 |
'payment_description' => { |
... | ... | |
231 | 231 |
'input_type' => 'input_tag', |
232 | 232 |
'input_name' => 'filter.payment.description:substr::ilike', |
233 | 233 |
'input_default' =>$filter->{payment}->{'description:substr::ilike'}, |
234 |
'report_id' => 'payment_id',
|
|
234 |
'report_id' => 'payment', |
|
235 | 235 |
'active' => 1, |
236 | 236 |
}, |
237 | 237 |
'currency_name' => { |
... | ... | |
240 | 240 |
'input_type' => 'input_tag', |
241 | 241 |
'input_name' => 'filter.currency.name:substr::ilike', |
242 | 242 |
'input_default' =>$filter->{currency}->{'name:substr::ilike'}, |
243 |
'report_id' => 'currency_id',
|
|
243 |
'report_id' => 'currency', |
|
244 | 244 |
'active' => 1, |
245 | 245 |
}, |
246 | 246 |
'exchangerate' => { |
... | ... | |
267 | 267 |
'input_type' => 'input_tag', |
268 | 268 |
'input_name' => 'filter.taxzone.description:substr::ilike', |
269 | 269 |
'input_default' =>$filter->{taxzone}->{'description:substr::ilike'}, |
270 |
'report_id' => 'taxzone_id',
|
|
270 |
'report_id' => 'taxzone', |
|
271 | 271 |
'active' => 1, |
272 | 272 |
}, |
273 | 273 |
'tax_point' => { |
Auch abrufbar als: Unified diff
FIX: Reklamationsbericht: Sortierung nach angezeigten Werten