Trigger

Hello All
                 I have fired trigger on quantity (qty) of sales order item table. When i select item from item code in sales order item it shows value 1(By default) in quantity field. when i changed value like 20, the trigger which i fired on qty is work fine. If their value is 1 (by default) and i have changed it to 1 again to call trigger that time quantity trigger does not work because already their is 1 present, But if i remove this 1,click on blank field and once again put 1 over their that time trigger is work. So can u please help me to solve this problem or tell me how can i default set 0 value to quantity when i select item from item code in sales order using client side only.

Thanks and Regards
Rohit



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/d2d7fe89-1bed-4cc7-8e60-73403e8fad28%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hi Rohit,

Please explain the problem as a list of steps. If possible, use screenshots. 

The current one is difficult to read and understand.

-Anand.

On 05-Jul-2013, at 3:26 PM, Rohit Waghchaure <ro...@indictranstech.com> wrote:

Hello All
                 I have fired trigger on quantity (qty) of sales order item table. When i select item from item code in sales order item it shows value 1(By default) in quantity field. when i changed value like 20, the trigger which i fired on qty is work fine. If their value is 1 (by default) and i have changed it to 1 again to call trigger that time quantity trigger does not work because already their is 1 present, But if i remove this 1,click on blank field and once again put 1 over their that time trigger is work. So can u please help me to solve this problem or tell me how can i default set 0 value to quantity when i select item from item code in sales order using client side only.

Thanks and Regards
Rohit



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/d2d7fe89-1bed-4cc7-8e60-73403e8fad28%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/38A064E4-970C-4605-8B6B-8E152C2B3A49%40erpnext.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hello Anand
I have attach snap shot whose description is as follows:
1 In first snap shot (pic 1) when i select test item qty is automatically set to 1( i want here value zero using client script only)

2 As i say i have written trigger on quantity so when i enter new quantity it fetch value and set to Item Volume and Total like Quantity=25 Item volume=12 total=300 which is correct (in 2nd pic).

3 But when i select new item (Quantity is 1 by default) for quantity 1 i need to enter 1 once again to fired trigger. So i enter 1 once again but it did not work

4 so i clear quantity and keep as blank (pic 3) it fetch value like quantity=blank Item volume=12 and Total=0

5 Now in place of blank value i have enter value 1 that time it working(pic 4)

So from above i have conclude that for integer values except 1 trigger work fine. For 1 i have to keep quantity as blank first and then enter 1 again to fired trigger. I think this is because when i select item code in sales order it keep quantity as 1 by default. So how i set zero here through client side only.

Thanks and Regards
Rohit


On Fri, Jul 5, 2013 at 5:25 PM, Anand Doshi <an...@iwebnotes.com> wrote:
Hi Rohit,

Please explain the problem as a list of steps. If possible, use screenshots.

The current one is difficult to read and understand.

-Anand.

On 05-Jul-2013, at 3:26 PM, Rohit Waghchaure <ro...@indictranstech.com> wrote:

Hello All
I have fired trigger on quantity (qty) of sales order item table. When i select item from item code in sales order item it shows value 1(By default) in quantity field. when i changed value like 20, the trigger which i fired on qty is work fine. If their value is 1 (by default) and i have changed it to 1 again to call trigger that time quantity trigger does not work because already their is 1 present, But if i remove this 1,click on blank field and once again put 1 over their that time trigger is work. So can u please help me to solve this problem or tell me how can i default set 0 value to quantity when i select item from item code in sales order using client side only.

Thanks and Regards
Rohit



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/d2d7fe89-1bed-4cc7-8e60-73403e8fad28%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.







You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/38A064E4-970C-4605-8B6B-8E152C2B3A49%40erpnext.com.

For more options, visit https://groups.google.com/groups/opt_out.





You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAFsi8V1CXmADF6JfroRg4CERaCXLsXRzS9kBApm–kcsH8-Wqg%40mail.gmail.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Rohit,

One work around is to create a button "Update Volume" to recalculate all volumes. Also update the volumes on client side validate and server side incase the user forgets to click the button.

- Rushabh


T: @rushabh_mehta

On 05-Jul-2013, at 6:04 PM, Rohit Waghchaure <ro...@indictranstech.com> wrote:

Hello Anand
                    I have attach snap shot whose description is as follows:
1 In first snap shot (pic 1) when i select test item qty is automatically set to 1( i want here value zero using client script only)

2 As i say i have written trigger on quantity so when i enter new quantity it fetch value and set to Item Volume and Total like Quantity=25  Item volume=12 total=300 which is correct (in 2nd pic).

3 But when i select new item (Quantity is 1 by default) for quantity 1 i need to enter 1 once again to fired trigger. So i enter 1 once again but it did not work

4 so i clear quantity and keep as blank (pic 3) it fetch value like quantity=blank Item volume=12 and Total=0

5 Now in place of blank value i have enter value 1 that time it working(pic 4)

So from above i have conclude that for integer values except 1 trigger work fine. For 1 i have to keep quantity as blank first and then enter 1 again to fired trigger. I think this is because when i select item code in sales order it keep quantity as 1 by default. So how i set zero here through client side only.

Thanks and Regards
Rohit


On Fri, Jul 5, 2013 at 5:25 PM, Anand Doshi <an...@iwebnotes.com> wrote:
Hi Rohit,

Please explain the problem as a list of steps. If possible, use screenshots. 

The current one is difficult to read and understand.

-Anand.

On 05-Jul-2013, at 3:26 PM, Rohit Waghchaure <ro...@indictranstech.com> wrote:

Hello All
                 I have fired trigger on quantity (qty) of sales order item table. When i select item from item code in sales order item it shows value 1(By default) in quantity field. when i changed value like 20, the trigger which i fired on qty is work fine. If their value is 1 (by default) and i have changed it to 1 again to call trigger that time quantity trigger does not work because already their is 1 present, But if i remove this 1,click on blank field and once again put 1 over their that time trigger is work. So can u please help me to solve this problem or tell me how can i default set 0 value to quantity when i select item from item code in sales order using client side only.

Thanks and Regards
Rohit



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/d2d7fe89-1bed-4cc7-8e60-73403e8fad28%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/38A064E4-970C-4605-8B6B-8E152C2B3A49%40erpnext.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 




You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAFsi8V1CXmADF6JfroRg4CERaCXLsXRzS9kBApm–kcsH8-Wqg%40mail.gmail.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

<Pic 1.png><Pic 2.png><Pic 3.png><Pic 4.png>




You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/95D63488-04B2-49D4-BE82-D7473725B5B6%40erpnext.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hi Anand
Is it possible to set quantity to zero when item get loaded into item code of item table in sales order using client script only without looking at server side.


Thanks and Regards
Rohit


On Fri, Jul 5, 2013 at 6:15 PM, Rushabh Mehta <rm…@gmail.com> wrote:
Rohit,

One work around is to create a button "Update Volume" to recalculate all volumes. Also update the volumes on client side validate and server side incase the user forgets to click the button.

- Rushabh


T: @rushabh_mehta

On 05-Jul-2013, at 6:04 PM, Rohit Waghchaure <ro...@indictranstech.com> wrote:

Hello Anand
I have attach snap shot whose description is as follows:
1 In first snap shot (pic 1) when i select test item qty is automatically set to 1( i want here value zero using client script only)


2 As i say i have written trigger on quantity so when i enter new quantity it fetch value and set to Item Volume and Total like Quantity=25 Item volume=12 total=300 which is correct (in 2nd pic).


3 But when i select new item (Quantity is 1 by default) for quantity 1 i need to enter 1 once again to fired trigger. So i enter 1 once again but it did not work


4 so i clear quantity and keep as blank (pic 3) it fetch value like quantity=blank Item volume=12 and Total=0

5 Now in place of blank value i have enter value 1 that time it working(pic 4)

So from above i have conclude that for integer values except 1 trigger work fine. For 1 i have to keep quantity as blank first and then enter 1 again to fired trigger. I think this is because when i select item code in sales order it keep quantity as 1 by default. So how i set zero here through client side only.


Thanks and Regards
Rohit


On Fri, Jul 5, 2013 at 5:25 PM, Anand Doshi <an…@iwebnotes.com> wrote:
Hi Rohit,

Please explain the problem as a list of steps. If possible, use screenshots.

The current one is difficult to read and understand.

-Anand.

On 05-Jul-2013, at 3:26 PM, Rohit Waghchaure <ro...@indictranstech.com> wrote:


Hello All
I have fired trigger on quantity (qty) of sales order item table. When i select item from item code in sales order item it shows value 1(By default) in quantity field. when i changed value like 20, the trigger which i fired on qty is work fine. If their value is 1 (by default) and i have changed it to 1 again to call trigger that time quantity trigger does not work because already their is 1 present, But if i remove this 1,click on blank field and once again put 1 over their that time trigger is work. So can u please help me to solve this problem or tell me how can i default set 0 value to quantity when i select item from item code in sales order using client side only.


Thanks and Regards
Rohit




You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/d2d7fe89-1bed-4cc7-8e60-73403e8fad28%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.








You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/38A064E4-970C-4605-8B6B-8E152C2B3A49%40erpnext.com.

For more options, visit https://groups.google.com/groups/opt_out.






You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAFsi8V1CXmADF6JfroRg4CERaCXLsXRzS9kBApm–kcsH8-Wqg%40mail.gmail.com.



For more options, visit https://groups.google.com/groups/opt_out.




<Pic 1.png><Pic 2.png><Pic 3.png><Pic 4.png>



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/95D63488-04B2-49D4-BE82-D7473725B5B6%40erpnext.com.

For more options, visit https://groups.google.com/groups/opt_out.





Please Note:

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    To post to this group, send email to er...@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAFsi8V3U20pJZH4Ykp2OJYTzJNXzvRJ2Tke4LiDUC8Gy1m_XBw%40mail.gmail.com.

    For more options, visit https://groups.google.com/groups/opt_out.

     

     
Hi Rohit,

Instead of setting qty as 0, you should aim for running the trigger when the Item details are fetched.

Do you pull the volume from server side using ajax or is it add fetch? How is the volume calculation done?
Without referring to the code, I can't give you any useful suggestions.

-Anand.

On 06-Jul-2013, at 9:05 AM, Rohit Waghchaure <ro...@indictranstech.com> wrote:

Hi Anand
                Is it possible to set quantity to zero when item get loaded into item code of item table in sales order using client script only without looking at server side.


Thanks and Regards
Rohit


On Fri, Jul 5, 2013 at 6:15 PM, Rushabh Mehta <rm…@gmail.com> wrote:
Rohit,

One work around is to create a button "Update Volume" to recalculate all volumes. Also update the volumes on client side validate and server side incase the user forgets to click the button.

- Rushabh


T: @rushabh_mehta

On 05-Jul-2013, at 6:04 PM, Rohit Waghchaure <ro...@indictranstech.com> wrote:

Hello Anand
                    I have attach snap shot whose description is as follows:
1 In first snap shot (pic 1) when i select test item qty is automatically set to 1( i want here value zero using client script only)


2 As i say i have written trigger on quantity so when i enter new quantity it fetch value and set to Item Volume and Total like Quantity=25  Item volume=12 total=300 which is correct (in 2nd pic).


3 But when i select new item (Quantity is 1 by default) for quantity 1 i need to enter 1 once again to fired trigger. So i enter 1 once again but it did not work


4 so i clear quantity and keep as blank (pic 3) it fetch value like quantity=blank Item volume=12 and Total=0

5 Now in place of blank value i have enter value 1 that time it working(pic 4)

So from above i have conclude that for integer values except 1 trigger work fine. For 1 i have to keep quantity as blank first and then enter 1 again to fired trigger. I think this is because when i select item code in sales order it keep quantity as 1 by default. So how i set zero here through client side only.


Thanks and Regards
Rohit


On Fri, Jul 5, 2013 at 5:25 PM, Anand Doshi <an…@iwebnotes.com> wrote:
Hi Rohit,

Please explain the problem as a list of steps. If possible, use screenshots. 

The current one is difficult to read and understand.

-Anand.

On 05-Jul-2013, at 3:26 PM, Rohit Waghchaure <ro...@indictranstech.com> wrote:


Hello All
                 I have fired trigger on quantity (qty) of sales order item table. When i select item from item code in sales order item it shows value 1(By default) in quantity field. when i changed value like 20, the trigger which i fired on qty is work fine. If their value is 1 (by default) and i have changed it to 1 again to call trigger that time quantity trigger does not work because already their is 1 present, But if i remove this 1,click on blank field and once again put 1 over their that time trigger is work. So can u please help me to solve this problem or tell me how can i default set 0 value to quantity when i select item from item code in sales order using client side only.


Thanks and Regards
Rohit




You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/d2d7fe89-1bed-4cc7-8e60-73403e8fad28%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/38A064E4-970C-4605-8B6B-8E152C2B3A49%40erpnext.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 




You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAFsi8V1CXmADF6JfroRg4CERaCXLsXRzS9kBApm–kcsH8-Wqg%40mail.gmail.com.



For more options, visit https://groups.google.com/groups/opt_out.

 

 
<Pic 1.png><Pic 2.png><Pic 3.png><Pic 4.png>




You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/95D63488-04B2-49D4-BE82-D7473725B5B6%40erpnext.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 




Please Note:

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To post to this group, send email to er…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAFsi8V3U20pJZH4Ykp2OJYTzJNXzvRJ2Tke4LiDUC8Gy1m_XBw%40mail.gmail.com.

    For more options, visit https://groups.google.com/groups/opt_out.

     

     

    <Quantity.png>



Please Note:

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    To post to this group, send email to er...@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/3C43BA98-9B1D-46FF-9A4A-1929AF7D0B96%40erpnext.com.

    For more options, visit https://groups.google.com/groups/opt_out.

     

     

Hi Rohit,
Did you find any solution for the qty change problem? I also have the same scenario please revert if you have solution for this.

Thanks