Revision 3efcf1eb
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/DB/Invoice.pm | ||
---|---|---|
sub items { goto &invoiceitems; }
|
||
sub add_items { goto &add_invoiceitems; }
|
||
sub record_number { goto &invnumber; };
|
||
sub record_type { goto &invoice_type; };
|
||
|
||
sub is_sales {
|
||
# For compatibility with Order, DeliveryOrder
|
SL/DB/Order.pm | ||
---|---|---|
{ from => PURCHASE_QUOTATION_INTAKE_TYPE(), to => PURCHASE_ORDER_TYPE(), abbr => 'pqipo' },
|
||
{ from => REQUEST_QUOTATION_TYPE(), to => PURCHASE_QUOTATION_INTAKE_TYPE(), abbr => 'rqpqi' },
|
||
);
|
||
my $from_to = (grep { $_->{from} eq $source->type && $_->{to} eq $destination_type} @from_tos)[0];
|
||
croak("Cannot convert from '" . $source->type . "' to '" . $destination_type . "'") if !$from_to;
|
||
my $from_to = (grep { $_->{from} eq $source->recrod_type && $_->{to} eq $destination_type} @from_tos)[0];
|
||
croak("Cannot convert from '" . $source->recrod_type . "' to '" . $destination_type . "'") if !$from_to;
|
||
|
||
my $is_abbr_any = sub {
|
||
any { $from_to->{abbr} eq $_ } @_;
|
SL/DB/PurchaseInvoice.pm | ||
---|---|---|
sub items { goto &invoiceitems; }
|
||
sub add_items { goto &add_invoiceitems; }
|
||
sub record_number { goto &invnumber; }
|
||
sub record_type { goto &invoice_type; }
|
||
|
||
sub is_sales {
|
||
# For compatibility with Order, DeliveryOrder
|
SL/DB/Reclamation.pm | ||
---|---|---|
{ from => 'invoice', to => SALES_RECLAMATION_TYPE(), abbr => 'sisr', },
|
||
{ from => 'purchase_invoice', to => PURCHASE_RECLAMATION_TYPE(), abbr => 'pipr', },
|
||
);
|
||
my $from_to = (grep { $_->{from} eq $source->type && $_->{to} eq $destination_type} @from_tos)[0];
|
||
my $from_to = (grep { $_->{from} eq $source->record_type && $_->{to} eq $destination_type} @from_tos)[0];
|
||
if (!$from_to) {
|
||
croak("Cannot convert from '" . $source->type . "' to '" . $destination_type . "'");
|
||
croak("Cannot convert from '" . $source->record_type . "' to '" . $destination_type . "'");
|
||
}
|
||
|
||
my $is_abbr_any = sub {
|
Auch abrufbar als: Unified diff
Model::Record: Nutzte record_type für Erstellung aus Workflow