Skip to Content
0

Need a SPT for Delivery Note

Aug 23, 2017 at 09:41 AM

32

avatar image

Dear Experts

Am having a Customer 'Cash Customer', it Is been used in my showroom counter, when ever a customer purchase on Cash, delivery note is generated via this Customer, and I had UDF called U_PMO, in which I have Cash & Credit

Now what I need is when a user select 'Cash Customer ' then he should be able to select U_PMO as Cash, if the user select Credit then Delivery Note should not be Allowed to add

pls help me to solve

REGARDS

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Balaji Selvaraj Aug 23, 2017 at 10:58 AM
0

Hi Vinod,

Try this.

Here i had given T0.CardName = CashCustomer a , Change the customer name as you had given

if @Object_type = '15' and @transaction_type in ('A', 'U')


begin


IF EXISTS (SELECT T0.DocNum FROM ORDR T0  
WHERE  (T0.CardName = 'CashCustomer' and T0.U_PMO ='Credit' ) and T0.docentry = @list_of_cols_val_tab_del )


BEGIN


SET @error = 15


SET @error_message = 'Pl Select the Appropriate Payment Mode !'


END


end
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi bala

I made some modificaition in the spt , and update in DB, pls see my Update SPT

but its not blocking the user

-------------------------------------------------------------------------------------------------------

if @Object_type ='15'and @transaction_type in('A')

begin

IFEXISTS(SELECT T0.DocNum FROM ODLN T0

WHERE (T0.CardCode IN('JB00000145''DB00000063''RB00000465''SM00000322''RB00000562')and T0.U_PMOD ='CREDIT')and T0.docentry = @list_of_cols_val_tab_del )

BEGIN

SET @error = 15

SET @error_message ='Pl Select the Appropriate Payment Mode !'

END

end

-----------------------------------------------------------------------------------------------------------------

Regards

0

Coma is missing between cardcode : T0.CardCode IN('JB00000145','DB00000063','RB00000465','SM00000322','RB00000562')

Is these customer are cash customer.

0