{ title => t8('Sales quotation'), type => 'sales_quotation', model => 'Order', number => 'quonumber', },
{ 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 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 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'), },
return _do_record($delivery_order, 'sales_delivery_order', %params);
}
+sub rma_delivery_order {
+ my ($delivery_order, %params) = @_;
+
+ return _do_new_record($delivery_order, 'rma_delivery_order', %params);
+}
+
sub purchase_delivery_order {
my ($delivery_order, %params) = @_;
return _do_record($delivery_order, 'purchase_delivery_order', %params);
}
+sub supplier_delivery_order {
+ my ($delivery_order, %params) = @_;
+
+ return _do_new_record($delivery_order, 'supplier_delivery_order', %params);
+}
+
+sub _do_new_record {
+ my ($delivery_order, $type, %params) = @_;
+
+ $params{display} ||= 'inline';
+
+ croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/;
+
+ my $text = join '', (
+ $params{no_link} ? '' : '<a href="contoller.pl?action=DeliveryOrder/edit&type=' . $type . '&id=' . escape($delivery_order->id) . '">',
+ escape($delivery_order->donumber),
+ $params{no_link} ? '' : '</a>',
+ );
+ is_escaped($text);
+}
+
sub _do_record {
my ($delivery_order, $type, %params) = @_;
$output .= _sales_quotation_list( $groups{sales_quotations}, %params) if $groups{sales_quotations};
$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_invoice_list( $groups{sales_invoices}, %params) if $groups{sales_invoices};
$output .= _ar_transaction_list( $groups{ar_transactions}, %params) if $groups{ar_transactions};
$output .= _request_quotation_list( $groups{purchase_quotations}, %params) if $groups{purchase_quotations};
$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_invoice_list( $groups{purchase_invoices}, %params) if $groups{purchase_invoices};
$output .= _ap_transaction_list( $groups{ap_transactions}, %params) if $groups{ap_transactions};
shop_orders => sub { (ref($_[0]) eq 'SL::DB::ShopOrder') && $_[0]->id },
sales_quotations => sub { (ref($_[0]) eq 'SL::DB::Order') && $_[0]->is_type('sales_quotation') },
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_sales },
+ 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_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_sales },
+ 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_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 _rma_delivery_order_list {
+ my ($list, %params) = @_;
+
+ return record_list(
+ $list,
+ title => $::locale->text('RMA Delivery Orders'),
+ type => 'rma_delivery_order',
+ columns => [
+ [ $::locale->text('Delivery Order Date'), 'transdate' ],
+ [ $::locale->text('Delivery Order Number'), sub { $_[0]->presenter->rma_delivery_order(display => 'table-cell') } ],
+ [ $::locale->text('Order Number'), 'ordnumber' ],
+ [ $::locale->text('Customer'), 'customer' ],
+ [ $::locale->text('Transaction description'), 'transaction_description' ],
+ [ $::locale->text('Project'), 'globalproject', ],
+ [ $::locale->text('Delivered'), 'delivered' ],
+ [ $::locale->text('Closed'), 'closed' ],
+ ],
+ %params,
+ );
+}
+
sub _purchase_delivery_order_list {
my ($list, %params) = @_;
);
}
+sub _supplier_delivery_order_list {
+ my ($list, %params) = @_;
+
+ return record_list(
+ $list,
+ title => $::locale->text('Supplier Delivery Orders'),
+ type => 'supplier_delivery_order',
+ columns => [
+ [ $::locale->text('Delivery Order Date'), 'transdate' ],
+ [ $::locale->text('Delivery Order Number'), sub { $_[0]->presenter->supplier_delivery_order(display => 'table-cell') } ],
+ [ $::locale->text('Order Number'), 'ordnumber' ],
+ [ $::locale->text('Vendor'), 'vendor' ],
+ [ $::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 * sales delivery orders
+=item * rma delivery orders
+
=item * sales invoices
=item * AR transactions
=item * purchase delivery orders
+=item * supplier delivery orders
+
=item * purchase invoices
=item * AP transactions
'RFQ Date' => 'Anfragedatum',
'RFQ Number' => 'Anfragenummer',
'RFQs' => 'Preisanfragen',
+ 'RMA Delivery Orders' => 'Retouren-Lieferscheine',
+ 'RMA delivery order' => 'Retouren-Lieferschein',
'ROP' => 'Mindestlagerbestand',
'Ranges of numbers' => 'Nummernkreise',
'Re-numbering all sections and function blocks in the order they are currently shown cannot be undone.' => 'Das Neu-Nummerieren aller Abschnitte und Funktionsblöcke kann nicht rückgängig gemacht werden.',
'Sun' => 'So',
'Sunday' => 'Sonntag',
'Superuser name' => 'Datenbankadministrator',
+ 'Supplier Delivery Orders' => 'Beistell-Lieferscheine',
+ 'Supplier delivery order' => 'Beistell-Lieferschein',
'Supplies' => 'Lieferungen',
'Surname' => 'Nachname',
'Switzerland' => 'Schweiz',