cancel
Showing results for 
Search instead for 
Did you mean: 

Need a SPT for Delivery Note

pvinod_kumar
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member312729
Active Contributor
0 Kudos

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
pvinod_kumar
Participant
0 Kudos

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

former_member312729
Active Contributor
0 Kudos

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

Is these customer are cash customer.

Answers (0)