object=ue_reservation=delivery_create=<base_docentry>=<base_ype>=<propertie>
(object=ue_reservation=delivery_create=<docentry>=<doctype>=<propertie>)
Mandatory
base_docentry (docentry) |
set the reference-document (= target-Document) |
base_type (doctype) |
Object-Type from Reference-Document |
Properties
cardcode |
Change the cardcode |
numatcard |
set the numatcard |
trackno |
|
comments |
|
trnspcode |
|
documentsowner (owner) |
Example to create a delivery from reservation-Table (from sales order)
before: set the docentry in ll_docentry
then you create the Delivery
destroy=reservation
declare=reservation=ue_reservation
reservation=delivery_load=<ll_docentry>=17
reservation=delivery_create=<ll_docentry>=17=trackno=3<tab>comments=direct<tab>documentsowner=1
if <e_docentry> n> 0 and <value> <> -1 then
shtml=message=ok$Ship Order <e_docentry> created
end if
Example as WEB-APP
1. get the document (Form docnumform beasscript)
// Scan Docentry
if <var:col_docnum> n= 0 then
setvar=ll_docentry=0
end if
if <var:col_docnum> n> 0 then
select docentry,cardcode,cardname,docstatus &
into :ll_docentry,:ls_cardcode,:ls_cardname,:ll_docstatus from ordr where docnum=<col_docnum>
if <ll_docentry> n= 0 then
shtml=message=error$wrong document number!
end if
if <ll_docstatus> <> O then
shtml=message=error$document is closed!
setvar=ll_docentry=0
end if
select count(*) from beas_reservation_line where base_type='17' and base_docentry=<ll_docentry>
if <wert1> n= 0 then
shtml=message=error$nothing picked for this customer order!
setvar=ll_docentry=0
end if
end if
if <ll_docentry> n= 0 then
? <div class="scan">@t=Pick Customer Order@</div>
shtml.formstart
? <input name="col_docnum" value="@var:col_docnum@">
shtml.formend=page
shtml.setfocus=col_docnum
setvar=lb_ok=false
return success
end if
shtml=htmlareastart
? @t=Customer Order@ <b>@col_docnum@ @ls_cardname@</b>
shtml=sqltable=def=1=(Item),2=(Lot Nr),3=(Warehouse),4=(Bin),5=(Quantity)
shtml=sqltable=sql=select itemcode,batchnum,whscode,bincode,quantity from beas_reservation_line where base_type='17' and base_docentry=<ll_docentry>
shtml=htmlareaend=selects
//
2. Create Delivery (shiporder - beasscript)
destroy=reservation
declare=reservation=ue_reservation
reservation=delivery_load=<ll_docentry>=17
reservation=delivery_create=<ll_docentry>=17
if <e_docentry> n> 0 and <value> <> -1 then
shtml=message=ok$Ship Order <e_docentry> created
end if
3. Main-Script
setvar=lb_ok=true
docnumform()
if <lb_ok> = true then
createorder()
end if