actindo ->bill__create
actindo -> bill__create: Create bill, optionally try to use specific belegnr, zuletzt geändert am __TICKET_NAME_RSFK-207__
Signaturstring bill__create( string $sid [, string $type [, string $belegnr [, string $customer [, string $positions [, bool $ignore_nonexisting [, ext_order_values $ext_order_values [, int|null $allow_partial_delivery [, numberranges_data $numberranges_data]]]]]]]] )
 
Parameter
  • string $sid
    Session identier you got from auth__login or auth__token_login
     
  • string $type
    Type of bill ('AN','RE',...)
     
  • string $belegnr
    Try to use this belegnr
     
  • string $customer
    array(deb_kred_id => 1, customer => dk_params customer info)
     
  • string $positions
    array(array(art_nr => '', menge => 1, overwrite => null, serial_numbers => array()))
     
  • bool $ignore_nonexisting
    if false abort if a position cannot be added because it cannot be found (default:true)
     
  • ext_order_values $ext_order_values
    ext_order_values verfügbar seit __TICKET_NAME_AC-6469__
     
  • int|null $allow_partial_delivery
    NULL=Faktura Einstellung, 0=Nicht erlaubt, 1=Erlaubt, 2=Erlaubt abhängig von der Lieferquote. verfügbar seit __TICKET_NAME_CHX-148__
     
  • numberranges_data $numberranges_data
    in case the numberranges module (Rechnungsnummernkreis pro Land) is active, verfügbar seit __TICKET_NAME_RSFK-207__
     
Returnsstring
Array( 'bill_id', 'type', 'belegnr', 'uid', 'positions' )
 
DescriptionCreate bill, optionally try to use specific belegnr, zuletzt geändert am __TICKET_NAME_RSFK-207__

Creates a bill and tries to use $belegnr (if given).
If $belegnr is already in use, use next free belegnr by calling get_free_belegnr()

The numberranges_data array may contain the following parameters
dk_land
dk_delivery_land
contract_source
webshop_order_shop_id
$webshop_order_subshop_id
ext_order_type
ext_order_account_id
ext_order_sub_account_id
best_type (Besteuerungsart: 'N'=>Normalbesteuerung, 'D'=>Differenzbesteuerung, 'M'=>Mischbesteuerung)

The ext_order_values array may contain the following parameters
type
account_id
sub_account_id
id
external_id
payment_order_id
payment_type
date
time
status
status_msg