Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 61e77af7

Von Kivitendo Admin vor etwa 1 Jahr hinzugefügt

  • ID 61e77af7e14605e4f29901842800837b8f1ecb8f
  • Vorgänger a13d9b94
  • Nachfolger 67a6d4d8

SL::Dev::Record - create_minimal_purchase_invoice

Umbenannt mit "minimal", da ein Großteil der Rechnungsfunktionalität
fehlt. Ohne PTC sollte ein purchase_invoice nur für sehr begrenzte
Tests verwendet werden.

Unterschiede anzeigen:

SL/Dev/Record.pm
20 20

  
21 21
                    create_purchase_order
22 22
                    create_purchase_delivery_order
23
                    create_purchase_invoice
23
                    create_minimal_purchase_invoice
24 24
                    create_purchase_reclamation
25 25

  
26 26
                    create_ap_transaction
......
88 88
  return $invoice;
89 89
}
90 90

  
91
sub create_purchase_invoice {
91
sub create_minimal_purchase_invoice {
92 92
  my (%params) = @_;
93 93

  
94 94
  my $record_type = 'purchase_invoice';
......
114 114
  );
115 115
  $invoice->assign_attributes(%params) if %params;
116 116

  
117
  # TODO: PTC can't deal with purchase invoices, so for now just save via Rose,
118
  # no amount/tax/acc_trans calculations.
119

  
117 120
  $invoice->save;
118 121
  return $invoice;
119 122
}
......
869 872
    taxincluded => 1,
870 873
  );
871 874

  
875
=head2 C<create_minimal_purchase_invoice %PARAMS>
876

  
877
Creates a new purchase invoice (table ap, invoice = 1), without any acc_trans
878
entries, amount or tax calculations! (PTC can't deal with purchase invoices yet)
879

  
880
Should only be used for basic testing of conversions from one record_type to
881
another, and specifically for testing the individual items of conversions.
882

  
883
For usage examples see C<create_sales_invoice>.
884

  
872 885
=head2 C<create_credit_note %PARAMS>
873 886

  
874 887
Create a credit note (sales). Use positive quantities when adding items.

Auch abrufbar als: Unified diff