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', |
Auch abrufbar als: Unified diff
FIX: Reklamationsbericht: Sortierung nach angezeigten Werten