Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e0c0b59f

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID e0c0b59f9045f106c1b0b94a7560b4bf61738802
  • Vorgänger 73eb1f18
  • Nachfolger 6542d206

EK/VK-Rechnung Typefilter für alle vorhandenen Typen erweitert

Unterschiede anzeigen:

SL/DB/Manager/Invoice.pm
16 16
  my $type  = lc(shift || '');
17 17

  
18 18
  return (or  => [ invoice => 0, invoice => undef                                               ]) if $type eq 'ar_transaction';
19
  return (type => 'invoice_for_advance_payment'                                                  ) if $type eq 'invoice_for_advance_payment';
20
  return (and => [ type => 'invoice_for_advance_payment', amount => { lt => 0 }                 ]) if $type eq 'invoice_for_advance_payment_storno';
21
  return (type => 'final_invoice'                                                                ) if $type eq 'final_invoice';
19 22
  return (and => [ invoice => 1, amount  => { ge => 0 }, or => [ storno => 0, storno => undef ] ]) if $type =~ m/^(?:sales_)?invoice$/;
20 23
  return (and => [ invoice => 1, amount  => { lt => 0 }, or => [ storno => 0, storno => undef ] ]) if $type eq 'credit_note';
21 24
  return (and => [ invoice => 1, amount  => { lt => 0 },         storno => 1                    ]) if $type =~ m/(?:invoice_)?storno/;
SL/DB/Manager/PurchaseInvoice.pm
16 16
  my $type  = lc(shift || '');
17 17

  
18 18
  return (or  => [ invoice => 0, invoice => undef                       ]) if $type eq 'ap_transaction';
19
  return (and => [ invoice => 1, or => [ storno => 0, storno => undef ] ]) if $type =~ m/^(?:purchase_)?invoice$/;
19
  return (and => [ invoice => 1, amount => { lt => 0 }, or => [ storno => 0, storno => undef ] ]) if $type eq 'purchase_credit_note';
20
  return (and => [ invoice => 1, amount => { ge => 0 }, or => [ storno => 0, storno => undef ] ]) if $type =~ m/^(?:purchase_)?invoice$/;
20 21
  return (and => [ invoice => 1,         storno => 1                    ]) if $type =~ m/(?:invoice_)?storno/;
21 22

  
22 23
  die "Unknown type $type";

Auch abrufbar als: Unified diff