12345678910111213141516171819202122232425262728293031323334353637 |
- $PBExportHeader$f_find_cust_dftprice.srf
- global type f_find_cust_dftprice from function_object
- end type
- forward prototypes
- global function integer f_find_cust_dftprice (long arg_pricelistid, long arg_mtrlid, ref decimal arg_price, ref decimal arg_rebate)
- end prototypes
- global function integer f_find_cust_dftprice (long arg_pricelistid, long arg_mtrlid, ref decimal arg_price, ref decimal arg_rebate);Int rslt = 1
- SELECT u_sale_price_mx.price,
- u_sale_price_mx.rebate
- INTO :arg_price,
- :arg_rebate
- FROM u_sale_price_list,u_sale_price_mx
- WHERE u_sale_price_list.pricelistid = u_sale_price_mx.pricelistid
- AND u_sale_price_list.pricelistid = :arg_pricelistid
- AND u_sale_price_mx.mtrlid = :arg_mtrlid;
- IF sqlca.SQLCode <> 0 THEN
- arg_price = 0
- arg_rebate = 1
- rslt = 0
- GOTO ext
- ELSEIF sqlca.SQLNRows = 0 THEN
- arg_price = 0
- arg_rebate = 1
- rslt = 0
- GOTO ext
- END IF
- ext:
- RETURN rslt
- end function
|