Revision 4a05bb49
Von Tamino Steinert vor mehr als 2 Jahren hinzugefügt
SL/Controller/RecordLinks.pm | ||
---|---|---|
use SL::DB::Invoice;
|
||
use SL::DB::Letter;
|
||
use SL::DB::PurchaseInvoice;
|
||
use SL::DB::Reclamation;
|
||
use SL::DB::RecordLink;
|
||
use SL::DB::RequirementSpec;
|
||
use SL::DBUtils qw(like);
|
||
... | ... | |
{ title => t8('Sales Order'), type => 'sales_order', model => 'Order', number => 'ordnumber', },
|
||
{ title => t8('Sales delivery order'), type => 'sales_delivery_order', model => 'DeliveryOrder', number => 'donumber', },
|
||
{ title => t8('RMA delivery order'), type => 'rma_delivery_order', model => 'DeliveryOrder', number => 'rdonumber', },
|
||
{ title => t8('Sales Reclamation'), type => 'sales_reclamation', model => 'Reclamation', number => 'record_number',},
|
||
{ title => t8('Sales Invoice'), type => 'invoice', model => 'Invoice', number => 'invnumber', },
|
||
{ title => t8('Request for Quotation'), type => 'request_quotation', model => 'Order', number => 'quonumber', },
|
||
{ title => t8('Purchase Order'), type => 'purchase_order', model => 'Order', number => 'ordnumber', },
|
||
{ title => t8('Purchase delivery order'), type => 'purchase_delivery_order', model => 'DeliveryOrder', number => 'donumber', },
|
||
{ title => t8('Supplier delivery order'), type => 'supplier_delivery_order', model => 'DeliveryOrder', number => 'sdonumber', },
|
||
{ title => t8('Purchase Reclamation'), type => 'purchase_reclamation', model => 'Reclamation', number => 'record_number',},
|
||
{ title => t8('Purchase Invoice'), type => 'purchase_invoice', model => 'PurchaseInvoice', number => 'invnumber', },
|
||
{ title => t8('Letter'), type => 'letter', model => 'Letter', number => 'letternumber', description => 'subject', description_title => t8('Subject'), date => 'date', project => undef },
|
||
{ title => t8('Email'), type => 'email_journal', model => 'EmailJournal', number => 'id', description => 'subject', description_title => t8('Subject'), },
|
SL/Presenter/Record.pm | ||
---|---|---|
$output .= _sales_order_list( $groups{sales_orders}, %params) if $groups{sales_orders};
|
||
$output .= _sales_delivery_order_list( $groups{sales_delivery_orders}, %params) if $groups{sales_delivery_orders};
|
||
$output .= _rma_delivery_order_list( $groups{rma_delivery_orders}, %params) if $groups{rma_delivery_orders};
|
||
$output .= _sales_reclamation_list( $groups{sales_reclamation}, %params) if $groups{sales_reclamation};
|
||
$output .= _sales_invoice_list( $groups{sales_invoices}, %params) if $groups{sales_invoices};
|
||
$output .= _ar_transaction_list( $groups{ar_transactions}, %params) if $groups{ar_transactions};
|
||
|
||
... | ... | |
$output .= _purchase_order_list( $groups{purchase_orders}, %params) if $groups{purchase_orders};
|
||
$output .= _purchase_delivery_order_list($groups{purchase_delivery_orders}, %params) if $groups{purchase_delivery_orders};
|
||
$output .= _supplier_delivery_order_list($groups{supplier_delivery_orders}, %params) if $groups{supplier_delivery_orders};
|
||
$output .= _purchase_reclamation_list( $groups{purchase_reclamation}, %params) if $groups{purchase_reclamation};
|
||
$output .= _purchase_invoice_list( $groups{purchase_invoices}, %params) if $groups{purchase_invoices};
|
||
$output .= _ap_transaction_list( $groups{ap_transactions}, %params) if $groups{ap_transactions};
|
||
|
||
... | ... | |
sales_orders => sub { (ref($_[0]) eq 'SL::DB::Order') && $_[0]->is_type('sales_order') },
|
||
sales_delivery_orders => sub { (ref($_[0]) eq 'SL::DB::DeliveryOrder') && $_[0]->is_type('sales_delivery_order') },
|
||
rma_delivery_orders => sub { (ref($_[0]) eq 'SL::DB::DeliveryOrder') && $_[0]->is_type('rma_delivery_order') },
|
||
sales_reclamation => sub { (ref($_[0]) eq 'SL::DB::Reclamation') && $_[0]->is_type('sales_reclamation') },
|
||
sales_invoices => sub { (ref($_[0]) eq 'SL::DB::Invoice') && $_[0]->invoice },
|
||
ar_transactions => sub { (ref($_[0]) eq 'SL::DB::Invoice') && !$_[0]->invoice },
|
||
purchase_quotations => sub { (ref($_[0]) eq 'SL::DB::Order') && $_[0]->is_type('request_quotation') },
|
||
purchase_orders => sub { (ref($_[0]) eq 'SL::DB::Order') && $_[0]->is_type('purchase_order') },
|
||
purchase_delivery_orders => sub { (ref($_[0]) eq 'SL::DB::DeliveryOrder') && $_[0]->is_type('purchase_delivery_order') },
|
||
supplier_delivery_orders => sub { (ref($_[0]) eq 'SL::DB::DeliveryOrder') && $_[0]->is_type('supplier_delivery_order') },
|
||
purchase_reclamation => sub { (ref($_[0]) eq 'SL::DB::Reclamation') && $_[0]->is_type('purchase_reclamation')},
|
||
purchase_invoices => sub { (ref($_[0]) eq 'SL::DB::PurchaseInvoice') && $_[0]->invoice },
|
||
ap_transactions => sub { (ref($_[0]) eq 'SL::DB::PurchaseInvoice') && !$_[0]->invoice },
|
||
sepa_collections => sub { (ref($_[0]) eq 'SL::DB::SepaExportItem') && $_[0]->ar_id },
|
||
... | ... | |
);
|
||
}
|
||
|
||
sub _sales_reclamation_list {
|
||
my ($list, %params) = @_;
|
||
|
||
return record_list(
|
||
$list,
|
||
title => $::locale->text('Sales Reclamation'),
|
||
type => 'sales_reclamation',
|
||
columns => [
|
||
[ $::locale->text('Reclamation Date'), 'transdate' ],
|
||
[ $::locale->text('Reclamation Number'), sub { $_[0]->presenter->sales_reclamation(display => 'table-cell') } ],
|
||
[ $::locale->text('Customer'), 'customer' ],
|
||
[ $::locale->text('Transaction description'), 'transaction_description' ],
|
||
[ $::locale->text('Project'), 'globalproject', ],
|
||
[ $::locale->text('Delivered'), 'delivered' ],
|
||
[ $::locale->text('Closed'), 'closed' ],
|
||
],
|
||
%params,
|
||
);
|
||
}
|
||
|
||
sub _sales_invoice_list {
|
||
my ($list, %params) = @_;
|
||
|
||
... | ... | |
|
||
=item * rma delivery orders
|
||
|
||
=item * sales reclamation
|
||
|
||
=item * sales invoices
|
||
|
||
=item * AR transactions
|
||
... | ... | |
|
||
=item * supplier delivery orders
|
||
|
||
=item * purchase reclamation
|
||
|
||
=item * purchase invoices
|
||
|
||
=item * AP transactions
|
Auch abrufbar als: Unified diff
Reclamation: added to RecordLinks