Guest User

Copy Delivery Date

a guest
Sep 12th, 2014
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. custom_delivery_date = function(doc) {
  2. //should run on change of delivery date and on load
  3. var delivery_date = doc.delivery_date;
  4. if(delivery_date && moment(delivery_date).isValid()) {
  5. $.each((doc.indent_details || []), function(i, d) {
  6. //if(!d.schedule_date) {
  7. d.schedule_date = delivery_date;
  8. //}
  9. });
  10. refresh_field("indent_details");
  11. }
  12. }
  13.  
  14. cur_frm.cscript.custom_onload = custom_delivery_date;
  15.  
  16. cur_frm.cscript.custom_delivery_date = custom_delivery_date;
Add Comment
Please, Sign In to add comment