Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3efcf1eb

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 3efcf1eb68c9285d0b80f1b511118d10e0802b7e
  • Vorgänger 1edd8271
  • Nachfolger 2dcde37c

Model::Record: Nutzte record_type für Erstellung aus Workflow

Unterschiede anzeigen:

SL/DB/Invoice.pm
109 109
sub items { goto &invoiceitems; }
110 110
sub add_items { goto &add_invoiceitems; }
111 111
sub record_number { goto &invnumber; };
112
sub record_type { goto &invoice_type; };
112 113

  
113 114
sub is_sales {
114 115
  # For compatibility with Order, DeliveryOrder
SL/DB/Order.pm
390 390
    { from => PURCHASE_QUOTATION_INTAKE_TYPE(), to => PURCHASE_ORDER_TYPE(),            abbr => 'pqipo'  },
391 391
    { from => REQUEST_QUOTATION_TYPE(),         to => PURCHASE_QUOTATION_INTAKE_TYPE(), abbr => 'rqpqi'  },
392 392
  );
393
  my $from_to = (grep { $_->{from} eq $source->type && $_->{to} eq $destination_type} @from_tos)[0];
394
  croak("Cannot convert from '" . $source->type . "' to '" . $destination_type . "'") if !$from_to;
393
  my $from_to = (grep { $_->{from} eq $source->recrod_type && $_->{to} eq $destination_type} @from_tos)[0];
394
  croak("Cannot convert from '" . $source->recrod_type . "' to '" . $destination_type . "'") if !$from_to;
395 395

  
396 396
  my $is_abbr_any = sub {
397 397
    any { $from_to->{abbr} eq $_ } @_;
SL/DB/PurchaseInvoice.pm
82 82
sub items { goto &invoiceitems; }
83 83
sub add_items { goto &add_invoiceitems; }
84 84
sub record_number { goto &invnumber; }
85
sub record_type { goto &invoice_type; }
85 86

  
86 87
sub is_sales {
87 88
  # For compatibility with Order, DeliveryOrder
SL/DB/Reclamation.pm
270 270
    { from => 'invoice',                 to => SALES_RECLAMATION_TYPE(),    abbr => 'sisr', },
271 271
    { from => 'purchase_invoice',        to => PURCHASE_RECLAMATION_TYPE(), abbr => 'pipr', },
272 272
  );
273
  my $from_to = (grep { $_->{from} eq $source->type && $_->{to} eq $destination_type} @from_tos)[0];
273
  my $from_to = (grep { $_->{from} eq $source->record_type && $_->{to} eq $destination_type} @from_tos)[0];
274 274
  if (!$from_to) {
275
    croak("Cannot convert from '" . $source->type . "' to '" . $destination_type . "'");
275
    croak("Cannot convert from '" . $source->record_type . "' to '" . $destination_type . "'");
276 276
  }
277 277

  
278 278
  my $is_abbr_any = sub {

Auch abrufbar als: Unified diff