SL/Dev/Record.pm - create_invoice_item Beispiel aktualisiert
authorG. Richardson <information@kivitendo-premium.de>
Mon, 7 Aug 2017 19:54:07 +0000 (21:54 +0200)
committerG. Richardson <information@kivitendo-premium.de>
Wed, 9 Aug 2017 11:19:34 +0000 (13:19 +0200)
SL/Dev/Record.pm

index 649c6b2..ae60ade 100644 (file)
@@ -383,7 +383,7 @@ Required params: record_type (sales_invoice, sales_order, sales_delivery_order)
 
 Example including creation of part and of invoice:
   my $part    = SL::Dev::Part::create_part(  partnumber  => 'T4254')->save;
-  my $item    = SL::Dev::Record::create_item(record_type => 'sales_invoice', part => $part, qty => 2.5);
+  my $item    = SL::Dev::Record::create_invoice_item(part => $part, qty => 2.5);
   my $invoice = SL::Dev::Record::create_sales_invoice(
     taxincluded  => 0,
     invoiceitems => [ $item ],