Receipt

Reads and creates a manual Receipt Document or display Receipt Documents.

Note: For receipt on work order documents, use ReceiptWo.

 

odata4/v1/receipt
 
{
"DocumentLines": [
  {"ItemCode": "RM_B",
   "WhsCode":"01",
   "BatchNumbers":[
       {"DistNumber":"BT-014","Quantity":2 }
           ]
   }
   ]
}

 

Create receipt document with beas Service Layer

 

 

beasscript-logo-small

// Create a receipt document with 5 new serial numbers
// in this example you can see, how to work with place holder
instance bsl b
setvar=ls_json=
for ll_loop=1 to 5
   addvar=ls_json={"ItemCode":"RM_S","WhsCode":"01","DistNumber":"<time,hhmmss><ll_loop>","Quantity":1}
   if <ll_loop> <> 5 then
      addvar=ls_json=,
   end if
next
setvar=ls_json={"DocumentLines":[<ls_json>]}
// in post command use only variable. 
// follow is not working: b.post=receipt={"DocumentLines":[<ls_json>]}
// because the system convert placeholder only, if the string don't start with {
b.post=receipt=<ls_json>
 
messagebox=<b.ret_code> <b.ret_text> <b.ret_value>
destroy b

 

help-hinweis Example Notes