I need to force users to enter amount>0 in the sales order items, how can I do this ??
–
Note:
If you are posting an issue,
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.
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.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
On Wednesday, March 5, 2014 4:09:34 PM UTC+5:30, HF wrote:
Hi;
I need to force users to enter amount>0 in the sales order items, how can I do this ??
–
Note:
If you are posting an issue,
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.
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.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
How this will affect every line in the sales items ??
On Wednesday, March 5, 2014 12:39:34 PM UTC+2, HF wrote:
Hi;
I need to force users to enter amount>0 in the sales order items, how can I do this ??
–
Note:
If you are posting an issue,
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.
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.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
$.each(wn.model.get("Sales Order Item", {parent:doc.name}), function(i, d) {
if(d.amount <= 0) {
msgprint("Please enter a value for X for item " + d.item_code);
throw, "X required";
}
}
}
On Sunday, March 9, 2014 5:41:56 PM UTC+5:30, HF wrote:
How this will affect every line in the sales items ??
On Wednesday, March 5, 2014 12:39:34 PM UTC+2, HF wrote:
Hi;
I need to force users to enter amount>0 in the sales order items, how can I do this ??
–
Note:
If you are posting an issue,
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.
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.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
On Monday, March 10, 2014 8:55:52 AM UTC+2, rushabh wrote:
sorry you can try this;
cur_frm.cscript.validate = function(doc) {
$.each(wn.model.get("Sales Order Item", {parent:doc.name}), function(i, d) {
if(d.amount <= 0) {
msgprint("Please enter a value for X for item " + d.item_code);
throw, "X required";
}
}
}
On Sunday, March 9, 2014 5:41:56 PM UTC+5:30, HF wrote:
How this will affect every line in the sales items ??
On Wednesday, March 5, 2014 12:39:34 PM UTC+2, HF wrote:
Hi;
I need to force users to enter amount>0 in the sales order items, how can I do this ??
–
Note:
If you are posting an issue,
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.
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.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
On Monday, March 10, 2014 8:55:52 AM UTC+2, rushabh wrote:
sorry you can try this;
cur_frm.cscript.validate = function(doc) {
$.each(wn.model.get("Sales Order Item", {parent:doc.name}), function(i, d) {
if(d.amount <= 0) {
msgprint("Please enter a value for X for item " + d.item_code);
throw, "X required";
}
}
}
On Sunday, March 9, 2014 5:41:56 PM UTC+5:30, HF wrote:
How this will affect every line in the sales items ??
On Wednesday, March 5, 2014 12:39:34 PM UTC+2, HF wrote:
Hi;
I need to force users to enter amount>0 in the sales order items, how can I do this ??
–
Note:
If you are posting an issue,
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.
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.
End of Note
—
You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
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.
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.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
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.
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.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
On Mon, Mar 10, 2014 at 6:27 PM, HF <gm...@gmail.com> wrote:
Hi Nabin;
It is not working ??
–
Note:
If you are posting an issue,
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.
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.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
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.
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.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
I think i and d variables are not defined for the function to work properly !!
–
Note:
If you are posting an issue,
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.
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.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
I found the correct solution as the below code, it works fine.
cur_frm.cscript.custom_validate = function(doc) {
var cl = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname);
for(var i = 0; i<cl.length; i++){
amt = flt(cl[i].amount);
if(amt==0) {
msgprint("Zero Value not allowed in any line of Sales Order, Please correct.");
return false;
}
}
}
–
Note:
If you are posting an issue,
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.
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.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.