actindo ->bill__create_from_payment_type
actindo -> bill__create_from_payment_type: Create bill from payment type, optionally try to use specific belegnr, last modified __TICKET_NAME_RSFK-207__
Signaturstring bill__create_from_payment_type( string $sid [, string $payment_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 $payment_type
    Payment type ('VK','PP','KK', ...)
     
  • 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
     
  • 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( 'ok'=>TRUE/FALSE, 'error', 'bill_id', 'type', 'belegnr', 'uid', 'positions' )
 
DescriptionCreate bill from payment type, optionally try to use specific belegnr, last modified __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

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