Revision 9b8bdc21
Von Kivitendo Admin vor etwa 2 Jahren hinzugefügt
SL/Dev/Record.pm | ||
---|---|---|
|
||
create_purchase_order
|
||
create_purchase_delivery_order
|
||
create_purchase_invoice
|
||
create_minimal_purchase_invoice
|
||
create_purchase_reclamation
|
||
|
||
create_ap_transaction
|
||
... | ... | |
return $invoice;
|
||
}
|
||
|
||
sub create_purchase_invoice {
|
||
sub create_minimal_purchase_invoice {
|
||
my (%params) = @_;
|
||
|
||
my $record_type = 'purchase_invoice';
|
||
... | ... | |
);
|
||
$invoice->assign_attributes(%params) if %params;
|
||
|
||
# TODO: PTC can't deal with purchase invoices, so for now just save via Rose,
|
||
# no amount/tax/acc_trans calculations.
|
||
|
||
$invoice->save;
|
||
return $invoice;
|
||
}
|
||
... | ... | |
taxincluded => 1,
|
||
);
|
||
|
||
=head2 C<create_minimal_purchase_invoice %PARAMS>
|
||
|
||
Creates a new purchase invoice (table ap, invoice = 1), without any acc_trans
|
||
entries, amount or tax calculations! (PTC can't deal with purchase invoices yet)
|
||
|
||
Should only be used for basic testing of conversions from one record_type to
|
||
another, and specifically for testing the individual items of conversions.
|
||
|
||
For usage examples see C<create_sales_invoice>.
|
||
|
||
=head2 C<create_credit_note %PARAMS>
|
||
|
||
Create a credit note (sales). Use positive quantities when adding items.
|
Auch abrufbar als: Unified diff
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.