@ 540, 20 BUTTON "SAVE" SIZE 150,30 PIXEL OF oDlg ;
ACTION ( AEval( aItems, { |o| o:Save() } ), oDlg:End() )
oBrw:Age:bOnChange := { |oCol, nOldVal| oBrw:Salary:VarPut( oCol:Value * <yourcalculation> ) }
aItems:= oSalesOrder:aItems // use a copy of the line-items
@ 3,1 XBROWSE oBrw OF oDlg ;
DATASOURCE aItems ;
COLUMNS "Itemno","Descrip","Cost","Qtyord","ExtPrice";
HEADERS "Item No", "Description","Cost","Qty Ordered","Total" ;
COLSIZES 50,140,70,70,70 ;
PICTURES "999";
SIZE 300,130
//COLORS CLR_WHITE, CLR_BLUE
oBrw:nRowHeight := 25
oBrw:lRecordSelector := .f.
// oBrw:nStretchCol := STRETCHCOL_LAST
oBrw:nRowDividerStyle := LINESTYLE_LIGHTGRAY
oBrw:nColDividerStyle := LINESTYLE_LIGHTGRAY
oBrw:lFastEdit := .T.
oBrw:aCols[ 4 ]:nEditType := EDIT_GET
// Update line item total and sales order total
// Errors out with: Error description: Error BASE/1004 Message not found: TXBROWSE:QTYORD
//msgInfo( oBrw:Qtyord, "oBrw:qtyord") // errors out
oBrw:qtyord:bOnChange := { |oCol| oBrw:extPrice:VarPut( oCol:cost * oCol:qtyord ) }
oBrw:nColSel:= 4 //oBrw:oCol( "QtyOrd" ):nCreationOrder
oBrw:CreateFromCode()
INVNO C 8 0
INVDTE D 8 0
CUSTNO C 4 0
ITEMNO C 6 0
DESCRIP C 20 0
COST N 7 2
RETAIL N 7 2
PACK N 4 0
SALEQTY N 1 0
UOM C 2 0
QTYORD N 3 0
QTYSHP N 3 0
EXTPRICE N 8 2
CLASS C 1 0
TAXABLE L 1 0
DEPT C 1 0
ARTYPE C 1 0
PLU C 11 0
Record length: 96
oBrw:QtyOrd:bOnChange := { | oCol | oBrw:extPrice:VarPut( oCol:Cost * oCol:QtyOrd ) }
COLUMNS "Itemno","Descrip","Cost","Qtyord","ExtPrice";
HEADERS "Item No", "Description","Cost","Qty Ordered","Total" ;
@ 3,1 XBROWSE oBrw OF oDlg ;
DATASOURCE aItems ;
COLUMNS 4, 5, 6, 11, 13 ; // "Itemno","Descrip","Cost","Qtyord","ExtPrice"
HEADERS "Item No", "Description","Cost","Qty Ordered","Total" ;
COLSIZES 50,140,70,70,70 ;
PICTURES "999", nil, "9,999.99", "999", "99,999.99" ;
SIZE 300,130
oBrw:QtyOrdered:bOnChange := { |oCol| oBrw:Total:VarPut( oBrw:cost:Value * oBrw:QtyOrdered:Value ) }
ItemNo Description Cost QtyOrd ExtPrice
3 TLINEITEMS
4 TLINEITEMS
5 TLINEITEMS
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 78 guests