{ "id": "roo-file-4", "name": "Pman.Dialog.XtupleCreditMemo", "parent": "", "title": "", "path": "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleCreditMemo.bjs", "items": [ { "listeners": { "|show": "function () {\n this.layout.getRegion('center').showPanel(0);\n}" }, ".builderCfg": "{\"cols\":[{\"table\":\"cohead\",\"column\":\"cohead_number\",\"columnshort\":\"cohead_number\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Order#\"},{\"table\":\"cohead\",\"column\":\"cohead_cust_id\",\"columnshort\":\"cohead_cust_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"cust_id\",\"deps\":[{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_active\",\"columnshort\":\"cust_active\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_custtype_id\",\"columnshort\":\"cust_custtype_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_salesrep_id\",\"columnshort\":\"cust_salesrep_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_commprcnt\",\"columnshort\":\"cust_commprcnt\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_name\",\"columnshort\":\"cust_name\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_creditlmt\",\"columnshort\":\"cust_creditlmt\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_creditrating\",\"columnshort\":\"cust_creditrating\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_financecharge\",\"columnshort\":\"cust_financecharge\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_backorder\",\"columnshort\":\"cust_backorder\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_partialship\",\"columnshort\":\"cust_partialship\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_terms_id\",\"columnshort\":\"cust_terms_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_discntprcnt\",\"columnshort\":\"cust_discntprcnt\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_balmethod\",\"columnshort\":\"cust_balmethod\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_ffshipto\",\"columnshort\":\"cust_ffshipto\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_shipform_id\",\"columnshort\":\"cust_shipform_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_shipvia\",\"columnshort\":\"cust_shipvia\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_blanketpos\",\"columnshort\":\"cust_blanketpos\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_shipchrg_id\",\"columnshort\":\"cust_shipchrg_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_creditstatus\",\"columnshort\":\"cust_creditstatus\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_comments\",\"columnshort\":\"cust_comments\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_ffbillto\",\"columnshort\":\"cust_ffbillto\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_usespos\",\"columnshort\":\"cust_usespos\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_number\",\"columnshort\":\"cust_number\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_dateadded\",\"columnshort\":\"cust_dateadded\",\"ctype\":\"date\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_exported\",\"columnshort\":\"cust_exported\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_emaildelivery\",\"columnshort\":\"cust_emaildelivery\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_ediemail\",\"columnshort\":\"cust_ediemail\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_edisubject\",\"columnshort\":\"cust_edisubject\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_edifilename\",\"columnshort\":\"cust_edifilename\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_ediemailbody\",\"columnshort\":\"cust_ediemailbody\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_autoupdatestatus\",\"columnshort\":\"cust_autoupdatestatus\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_autoholdorders\",\"columnshort\":\"cust_autoholdorders\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_edicc\",\"columnshort\":\"cust_edicc\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_ediprofile_id\",\"columnshort\":\"cust_ediprofile_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_preferred_warehous_id\",\"columnshort\":\"cust_preferred_warehous_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_curr_id\",\"columnshort\":\"cust_curr_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_creditlmt_curr_id\",\"columnshort\":\"cust_creditlmt_curr_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_cntct_id\",\"columnshort\":\"cust_cntct_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_corrcntct_id\",\"columnshort\":\"cust_corrcntct_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_soemaildelivery\",\"columnshort\":\"cust_soemaildelivery\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_soediemail\",\"columnshort\":\"cust_soediemail\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_soedisubject\",\"columnshort\":\"cust_soedisubject\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_soedifilename\",\"columnshort\":\"cust_soedifilename\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_soediemailbody\",\"columnshort\":\"cust_soediemailbody\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_soedicc\",\"columnshort\":\"cust_soedicc\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_soediprofile_id\",\"columnshort\":\"cust_soediprofile_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_gracedays\",\"columnshort\":\"cust_gracedays\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_ediemailhtml\",\"columnshort\":\"cust_ediemailhtml\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_soediemailhtml\",\"columnshort\":\"cust_soediemailhtml\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"custinfo\",\"column\":\"cohead_cust_id_cust_taxzone_id\",\"columnshort\":\"cust_taxzone_id\",\"ctype\":\"int4\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"Customer\",\"display\":\"cohead_cust_id_cust_name\"},{\"table\":\"cohead\",\"column\":\"cohead_custponumber\",\"columnshort\":\"cohead_custponumber\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Customer PO#\"},{\"table\":\"cohead\",\"column\":\"cohead_orderdate\",\"columnshort\":\"cohead_orderdate\",\"ctype\":\"date\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Ordered\"},{\"table\":\"cohead\",\"column\":\"cohead_warehous_id\",\"columnshort\":\"cohead_warehous_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"warehous_id\",\"deps\":[{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_code\",\"columnshort\":\"warehous_code\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_descrip\",\"columnshort\":\"warehous_descrip\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_fob\",\"columnshort\":\"warehous_fob\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_active\",\"columnshort\":\"warehous_active\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_counttag_prefix\",\"columnshort\":\"warehous_counttag_prefix\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_counttag_number\",\"columnshort\":\"warehous_counttag_number\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_bol_prefix\",\"columnshort\":\"warehous_bol_prefix\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_bol_number\",\"columnshort\":\"warehous_bol_number\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_shipping\",\"columnshort\":\"warehous_shipping\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_useslips\",\"columnshort\":\"warehous_useslips\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_usezones\",\"columnshort\":\"warehous_usezones\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_aislesize\",\"columnshort\":\"warehous_aislesize\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_aislealpha\",\"columnshort\":\"warehous_aislealpha\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_racksize\",\"columnshort\":\"warehous_racksize\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_rackalpha\",\"columnshort\":\"warehous_rackalpha\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_binsize\",\"columnshort\":\"warehous_binsize\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_binalpha\",\"columnshort\":\"warehous_binalpha\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_locationsize\",\"columnshort\":\"warehous_locationsize\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_locationalpha\",\"columnshort\":\"warehous_locationalpha\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_enforcearbl\",\"columnshort\":\"warehous_enforcearbl\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_default_accnt_id\",\"columnshort\":\"warehous_default_accnt_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_shipping_commission\",\"columnshort\":\"warehous_shipping_commission\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_cntct_id\",\"columnshort\":\"warehous_cntct_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_addr_id\",\"columnshort\":\"warehous_addr_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_transit\",\"columnshort\":\"warehous_transit\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_shipform_id\",\"columnshort\":\"warehous_shipform_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_shipvia_id\",\"columnshort\":\"warehous_shipvia_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_shipcomments\",\"columnshort\":\"warehous_shipcomments\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_costcat_id\",\"columnshort\":\"warehous_costcat_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_sitetype_id\",\"columnshort\":\"warehous_sitetype_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_taxzone_id\",\"columnshort\":\"warehous_taxzone_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"whsinfo\",\"column\":\"cohead_warehous_id_warehous_sequence\",\"columnshort\":\"warehous_sequence\",\"ctype\":\"int4\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"Warehouse\",\"display\":\"cohead_warehous_id_warehous_descrip\"},{\"table\":\"cohead\",\"column\":\"cohead_shipto_id\",\"columnshort\":\"cohead_shipto_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"shipto_id\",\"deps\":[{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_cust_id\",\"columnshort\":\"shipto_cust_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_name\",\"columnshort\":\"shipto_name\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_salesrep_id\",\"columnshort\":\"shipto_salesrep_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_comments\",\"columnshort\":\"shipto_comments\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_shipcomments\",\"columnshort\":\"shipto_shipcomments\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_shipzone_id\",\"columnshort\":\"shipto_shipzone_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_shipvia\",\"columnshort\":\"shipto_shipvia\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_commission\",\"columnshort\":\"shipto_commission\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_shipform_id\",\"columnshort\":\"shipto_shipform_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_shipchrg_id\",\"columnshort\":\"shipto_shipchrg_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_active\",\"columnshort\":\"shipto_active\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_default\",\"columnshort\":\"shipto_default\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_num\",\"columnshort\":\"shipto_num\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_ediprofile_id\",\"columnshort\":\"shipto_ediprofile_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_cntct_id\",\"columnshort\":\"shipto_cntct_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_addr_id\",\"columnshort\":\"shipto_addr_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"shiptoinfo\",\"column\":\"cohead_shipto_id_shipto_taxzone_id\",\"columnshort\":\"shipto_taxzone_id\",\"ctype\":\"int4\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"Ship to\",\"display\":\"cohead_shipto_id_shipto_name\"},{\"table\":\"cohead\",\"column\":\"cohead_shiptoname\",\"columnshort\":\"cohead_shiptoname\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Ship to name\"},{\"table\":\"cohead\",\"column\":\"cohead_shiptoaddress1\",\"columnshort\":\"cohead_shiptoaddress1\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Ship to address\"},{\"table\":\"cohead\",\"column\":\"cohead_shiptoaddress2\",\"columnshort\":\"cohead_shiptoaddress2\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Ship to address(2)\"},{\"table\":\"cohead\",\"column\":\"cohead_shiptoaddress3\",\"columnshort\":\"cohead_shiptoaddress3\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Ship to address(3)\"},{\"table\":\"cohead\",\"column\":\"cohead_shiptoaddress4\",\"columnshort\":\"cohead_shiptoaddress4\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Ship to address(4)\"},{\"table\":\"cohead\",\"column\":\"cohead_shiptoaddress5\",\"columnshort\":\"cohead_shiptoaddress5\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Ship to address(5)\"},{\"table\":\"cohead\",\"column\":\"cohead_salesrep_id\",\"columnshort\":\"cohead_salesrep_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"salesrep_id\",\"deps\":[{\"table\":\"salesrep\",\"column\":\"cohead_salesrep_id_salesrep_active\",\"columnshort\":\"salesrep_active\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"salesrep\",\"column\":\"cohead_salesrep_id_salesrep_number\",\"columnshort\":\"salesrep_number\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"salesrep\",\"column\":\"cohead_salesrep_id_salesrep_name\",\"columnshort\":\"salesrep_name\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"salesrep\",\"column\":\"cohead_salesrep_id_salesrep_commission\",\"columnshort\":\"salesrep_commission\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"salesrep\",\"column\":\"cohead_salesrep_id_salesrep_method\",\"columnshort\":\"salesrep_method\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"salesrep\",\"column\":\"cohead_salesrep_id_salesrep_emp_id\",\"columnshort\":\"salesrep_emp_id\",\"ctype\":\"int4\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"Staff I.C.\",\"display\":\"cohead_salesrep_id_salesrep_name\"},{\"table\":\"cohead\",\"column\":\"cohead_terms_id\",\"columnshort\":\"cohead_terms_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"terms_id\",\"deps\":[{\"table\":\"terms\",\"column\":\"cohead_terms_id_terms_code\",\"columnshort\":\"terms_code\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"terms\",\"column\":\"cohead_terms_id_terms_descrip\",\"columnshort\":\"terms_descrip\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"terms\",\"column\":\"cohead_terms_id_terms_type\",\"columnshort\":\"terms_type\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"terms\",\"column\":\"cohead_terms_id_terms_duedays\",\"columnshort\":\"terms_duedays\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"terms\",\"column\":\"cohead_terms_id_terms_discdays\",\"columnshort\":\"terms_discdays\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"terms\",\"column\":\"cohead_terms_id_terms_discprcnt\",\"columnshort\":\"terms_discprcnt\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"terms\",\"column\":\"cohead_terms_id_terms_cutoffday\",\"columnshort\":\"terms_cutoffday\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"terms\",\"column\":\"cohead_terms_id_terms_ap\",\"columnshort\":\"terms_ap\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"terms\",\"column\":\"cohead_terms_id_terms_ar\",\"columnshort\":\"terms_ar\",\"ctype\":\"bool\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"Terms\",\"display\":\"cohead_terms_id_terms_descrip\"},{\"table\":\"cohead\",\"column\":\"cohead_ordercomments\",\"columnshort\":\"cohead_ordercomments\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Order Comments\"},{\"table\":\"cohead\",\"column\":\"cohead_shipcomments\",\"columnshort\":\"cohead_shipcomments\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Shipment Comments\"},{\"table\":\"cohead\",\"column\":\"cohead_curr_id\",\"columnshort\":\"cohead_curr_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"curr_id\",\"deps\":[{\"table\":\"curr_symbol\",\"column\":\"cohead_curr_id_curr_base\",\"columnshort\":\"curr_base\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"curr_symbol\",\"column\":\"cohead_curr_id_curr_name\",\"columnshort\":\"curr_name\",\"ctype\":\"varchar\",\"desc\":\"\"},{\"table\":\"curr_symbol\",\"column\":\"cohead_curr_id_curr_symbol\",\"columnshort\":\"curr_symbol\",\"ctype\":\"varchar\",\"desc\":\"\"},{\"table\":\"curr_symbol\",\"column\":\"cohead_curr_id_curr_abbr\",\"columnshort\":\"curr_abbr\",\"ctype\":\"varchar\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"Currency\",\"display\":\"cohead_curr_id_curr_symbol\"},{\"table\":\"cohead\",\"column\":\"cohead_shipto_cntct_id\",\"columnshort\":\"cohead_shipto_cntct_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"cntct_id\",\"deps\":[{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_crmacct_id\",\"columnshort\":\"cntct_crmacct_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_addr_id\",\"columnshort\":\"cntct_addr_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_first_name\",\"columnshort\":\"cntct_first_name\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_last_name\",\"columnshort\":\"cntct_last_name\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_honorific\",\"columnshort\":\"cntct_honorific\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_initials\",\"columnshort\":\"cntct_initials\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_active\",\"columnshort\":\"cntct_active\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_phone\",\"columnshort\":\"cntct_phone\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_phone2\",\"columnshort\":\"cntct_phone2\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_fax\",\"columnshort\":\"cntct_fax\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_email\",\"columnshort\":\"cntct_email\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_webaddr\",\"columnshort\":\"cntct_webaddr\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_notes\",\"columnshort\":\"cntct_notes\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_title\",\"columnshort\":\"cntct_title\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_number\",\"columnshort\":\"cntct_number\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_middle\",\"columnshort\":\"cntct_middle\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_suffix\",\"columnshort\":\"cntct_suffix\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_owner_username\",\"columnshort\":\"cntct_owner_username\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_shipto_cntct_id_cntct_name\",\"columnshort\":\"cntct_name\",\"ctype\":\"text\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"Ship to Contact\",\"display\":\"cohead_shipto_cntct_id_cntct_name\"},{\"table\":\"cohead\",\"column\":\"cohead_billto_cntct_id\",\"columnshort\":\"cohead_billto_cntct_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"cntct_id\",\"deps\":[{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_crmacct_id\",\"columnshort\":\"cntct_crmacct_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_addr_id\",\"columnshort\":\"cntct_addr_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_first_name\",\"columnshort\":\"cntct_first_name\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_last_name\",\"columnshort\":\"cntct_last_name\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_honorific\",\"columnshort\":\"cntct_honorific\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_initials\",\"columnshort\":\"cntct_initials\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_active\",\"columnshort\":\"cntct_active\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_phone\",\"columnshort\":\"cntct_phone\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_phone2\",\"columnshort\":\"cntct_phone2\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_fax\",\"columnshort\":\"cntct_fax\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_email\",\"columnshort\":\"cntct_email\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_webaddr\",\"columnshort\":\"cntct_webaddr\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_notes\",\"columnshort\":\"cntct_notes\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_title\",\"columnshort\":\"cntct_title\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_number\",\"columnshort\":\"cntct_number\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_middle\",\"columnshort\":\"cntct_middle\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_suffix\",\"columnshort\":\"cntct_suffix\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_owner_username\",\"columnshort\":\"cntct_owner_username\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"cntct\",\"column\":\"cohead_billto_cntct_id_cntct_name\",\"columnshort\":\"cntct_name\",\"ctype\":\"text\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"Bill To (name)\",\"display\":\"cohead_billto_cntct_id_cntct_name\"},{\"table\":\"cohead\",\"column\":\"cohead_taxzone_id\",\"columnshort\":\"cohead_taxzone_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"taxzone_id\",\"deps\":[{\"table\":\"taxzone\",\"column\":\"cohead_taxzone_id_taxzone_code\",\"columnshort\":\"taxzone_code\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"taxzone\",\"column\":\"cohead_taxzone_id_taxzone_descrip\",\"columnshort\":\"taxzone_descrip\",\"ctype\":\"text\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"Tax Zone\",\"display\":\"cohead_taxzone_id_taxzone_descrip\"},{\"table\":\"cohead\",\"column\":\"cohead_taxtype_id\",\"columnshort\":\"cohead_taxtype_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"taxtype_id\",\"deps\":[{\"table\":\"taxtype\",\"column\":\"cohead_taxtype_id_taxtype_name\",\"columnshort\":\"taxtype_name\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"taxtype\",\"column\":\"cohead_taxtype_id_taxtype_descrip\",\"columnshort\":\"taxtype_descrip\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"taxtype\",\"column\":\"cohead_taxtype_id_taxtype_sys\",\"columnshort\":\"taxtype_sys\",\"ctype\":\"bool\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"Tax Type\",\"display\":\"cohead_taxtype_id_taxtype_descrip\"}],\"cols_ex\":[\"cohead_cust_id_cust_name\",\"cohead_warehous_id_warehous_descrip\",\"cohead_shipto_id_shipto_name\",\"cohead_salesrep_id_salesrep_name\",\"cohead_terms_id_terms_descrip\",\"cohead_curr_id_curr_symbol\",\"cohead_shipto_cntct_id_cntct_name\",\"cohead_billto_cntct_id_cntct_name\",\"cohead_taxzone_id_taxzone_descrip\",\"cohead_taxtype_id_taxtype_descrip\"],\"table\":\"cohead\",\"xtype\":\"LayoutDialog\",\"|xns\":\"Roo\"}", "closable": true, "collapsible": false, "height": 450, "modal": true, "resizable": true, "title": "Edit / Create Credit Memo", "width": 950, "xtype": "LayoutDialog", "|xns": "Roo", "items": [ { "|xns": "Roo", "xtype": "LayoutRegion", "*prop": "center", "alwaysShowTabs": true, "tabPosition": "top" }, { "listeners": { "activate": "function (_self)\n{\n // we need to reload to find out the subtotal.\n if (!_this.data || !_this.data.cmhead_id) {\n return;\n }\n \n new Pman.Request({\n method : 'GET',\n url : baseURL + '/Roo/cmhead',\n params : { \n _id : _this.data.cmhead_id\n },\n success : function(res) {\n // update the items and tax values...?\n\n _this.form.findField('cmhead_taxfree_value').setValue(res.data.cmhead_taxfree_value);\n _this.form.findField('cmhead_tax_value').setValue(res.data.cmhead_tax_value * 1); \n _this.form.findField('cmhead_taxable_value').setValue(res.data.cmhead_taxable_value * 1); \n _this.form.findField('cmhead_misc_per').update();\n _this.form.findField('cmhead_total').recalc();\n \n }\n });\n}" }, "region": "center", "title": "Credit Details", "xtype": "ContentPanel", "|xns": "Roo", "items": [ { "listeners": { "|actioncomplete": "function(_self,action)\n{\n if (action.type == 'setdata') {\n _this.saveBtn.show();\n \n if (_this.data.cmhead_id) {\n this.load({ method: 'GET', params: { '_id' : _this.data.cmhead_id }});\n \n return;\n }\n _this.dialog.setTitle(\"Add New Credit Memo\");\n \n _this.form.findField('cmhead_docdate').setValue(new Date());\n \n return;\n }\n if (action.type == 'load') {\n \n _this.data = action.result.data;\n \n if(_this.data.cmhead_posted){\n _this.saveBtn.hide();\n }\n _this.dataloading = true;\n if (_this.data.cmhead_shipto_cntct_id == _this.data.cmhead_billto_cntct_id) {\n this.findField('_shipto_same').setValue(1);\n Roo.log('set shipto 1');\n } else {\n// this.findField('_shipto_same').setValue(0);\n Roo.log('set shipto 0');\n }\n _this.dataloading = false; \n \n \n this.findField('billto_address').update();\n// this.findField('shipto_address').update(); \n _this.dialog.setTitle(\"Edit Credit Memo Order - \" + this.findField('cmhead_number').getValue());\n \n _this.form.findField('cmhead_misc_per').update();\n _this.form.findField('cmhead_total').recalc();\n return;\n }\n if (action.type =='submit') {\n \n\n var id = _this.form.findField('cmhead_id').getValue() * 1;\n if (id < 1) {\n\n _this.data.cmhead_id = action.result.data.cmhead_id;\n this.load({ method: 'GET', params: { '_id' : _this.data.cmhead_id }});\n return;\n }\n \n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset();\n return;\n }\n}\n", "|rendered": "function (form)\n{\n _this.form= form;\n}\n", "actionfailed": "function (_self, action)\n{\n if (action.failureType == 'client') {\n Roo.MessageBox.alert(\"Error\", \"Fill in all the required fields\");\n }\n if (action.failureType == 'server') { \n Roo.log(action);\n Roo.MessageBox.alert(\"Error\", action.result.errorMsg);\n }\n _this.dialog.layout.getRegion('center').showPanel(0);\n}" }, "method": "POST", "style": "margin:10px;", "xtype": "Form", "|url": "baseURL + '/Roo/cmhead.php'", "|xns": "Roo.form", "items": [ { "xtype": "Column", "|xns": "Roo.form", "width": "435", "items": [ { "labelWidth": 120, "legend": "Credit", "style": "width:420px", "xtype": "FieldSet", "|xns": "Roo.form", "items": [ { "labelWidth": 100, "width": 410, "xtype": "Column", "|xns": "Roo.form", "items": [ { "allowBlank": true, "emptyText": "Automatic", "fieldLabel": "Ref #", "name": "cmhead_number", "readOnly": true, "width": 150, "xtype": "TextField", "|xns": "Roo.form" }, { "editable": false, "fieldLabel": "Customer", "name": "cmhead_cust_id_cust_name", "readOnly": true, "width": 300, "xtype": "TextField", "|xns": "Roo.form" }, { "allowBlank": false, "displayField": "location_name", "editable": true, "emptyText": "select location", "fieldLabel": "Return stock to", "forceSelection": true, "hiddenName": "cmhead_location_id", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "cmhead_location_id_location_name", "pageSize": 200, "qtip": "Select terms", "queryParam": "query[location_name]", "selectOnFocus": true, "tpl": "
{location_name} {location_descrip}
", "triggerAction": "all", "typeAhead": true, "valueField": "location_id", "width": 300, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.location_netable = 1;\n o.params._notinternalcompany = 1;\n o.params.location_restrict = 0;\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'location_name' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/location.php'", "|xns": "Roo.data" }, { "*prop": "reader", "id": "location_id", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[{'name':'location_id','type':'int'},'location_name']", "|xns": "Roo.data" } ] } ] }, { "allowBlank": false, "fieldLabel": "Date", "format": "Y-m-d", "name": "cmhead_docdate", "width": 100, "xtype": "DateField", "|xns": "Roo.form" }, { "displayField": "salesrep_name", "editable": false, "emptyText": "Select salesrep", "fieldLabel": "Staff I.C.", "forceSelection": true, "hiddenName": "cmhead_salesrep_id", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "cmhead_salesrep_id_salesrep_name", "pageSize": 20, "qtip": "Select salesrep", "queryParam": "query[salesrep_name]", "selectOnFocus": true, "tpl": "
{salesrep_name}
", "triggerAction": "all", "typeAhead": true, "valueField": "salesrep_id", "width": 300, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'salesrep_name' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "xtype": "HttpProxy", "method": "GET", "|xns": "Roo.data", "|url": "baseURL + '/Roo/salesrep.php'" }, { "*prop": "reader", "id": "salesrep_id", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[{'name':'salesrep_id','type':'int'},'salesrep_name']", "|xns": "Roo.data" } ] } ] }, { "fieldLabel": "Comments", "height": 80, "name": "cmhead_comments", "width": 300, "xtype": "TextArea", "|xns": "Roo.form" } ] } ] } ] }, { "style": "margin-left:10px", "width": 450, "xtype": "Column", "|xns": "Roo.form", "items": [ { "xtype": "FieldSet", "|xns": "Roo.form", "legend": "Price Details", "style": "width:420px", "labelWidth": "50", "items": [ { "labelAlign": "right", "labelWidth": 300, "width": 420, "xtype": "Column", "|xns": "Roo.form", "items": [ { "labelAlign": "right", "labelWidth": 300, "width": 500, "xtype": "Row", "|xns": "Roo.form", "items": [ { "allowDecimals": true, "cls": "roo-align-right", "decimalPrecision": 3, "fieldLabel": "Taxable Value", "name": "cmhead_taxable_value", "readOnly": true, "width": 100, "xtype": "NumberField", "|xns": "Roo.form" }, { "allowDecimals": true, "cls": "roo-align-right", "decimalPrecision": 3, "fieldLabel": "Tax Free Value", "name": "cmhead_taxfree_value", "readOnly": true, "width": 100, "xtype": "NumberField", "|xns": "Roo.form" } ] }, { "labelAlign": "top", "labelSeparator": " ", "width": 500, "xtype": "Row", "|xns": "Roo.form", "items": [ { "allowBlank": false, "displayField": "curr_name", "editable": false, "emptyText": "Select Currency", "fieldLabel": "Currency", "forceSelection": true, "hiddenName": "cmhead_curr_id", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "cmhead_curr_id_curr_name", "pageSize": 20, "qtip": "Select Currency", "queryParam": "query[curr_name]", "selectOnFocus": true, "tpl": "
{curr_name}
", "triggerAction": "all", "typeAhead": true, "valueField": "curr_id", "width": 285, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n \n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'curr_symbol' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "xtype": "HttpProxy", "method": "GET", "|xns": "Roo.data", "|url": "baseURL + '/Roo/curr_symbol.php'" }, { "*prop": "reader", "id": "curr_id", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[{'name':'curr_id','type':'int'},'curr_symbol']", "|xns": "Roo.data" } ] } ] }, { "listeners": { "keyup": "function (_self, e)\n{\n _this.form.findField('cmhead_total').recalc();\n}" }, "allowDecimals": true, "cls": "roo-align-right", "decimalPrecision": 3, "fieldLabel": "Freight", "name": "cmhead_freight", "width": 100, "xtype": "NumberField", "|xns": "Roo.form" } ] }, { "labelAlign": "top", "labelSeparator": " ", "width": 500, "xtype": "Row", "|xns": "Roo.form", "items": [ { "fieldLabel": "Discount Description", "name": "cmhead_misc_descrip", "width": 230, "xtype": "TextField", "|xns": "Roo.form" }, { "listeners": { "keyup": "function (_self, e)\n{\n var m = _this.form.findField('cmhead_misc');\n var pv = _this.form.findField('cmhead_value').getValue();\n var n = this.getValue();\n var discount = parseInt(n * pv * 0.01);\n m.setValue(discount * -1.000);\n \n \n _this.form.findField('cmhead_total').recalc();\n var val = discount * -1.0;\n if (val > 0) {\n _this.form.findField('cohead_misc_descrip').setValue(\"Discount of \" + val.toFixed(1)+'%');\n }\n}" }, "allowDecimals": true, "cls": "roo-align-right", "decimalPrecision": 1, "fieldLabel": "%", "name": "cmhead_misc_per", "width": 35, "xtype": "NumberField", "|update": "function() {\n var m = _this.form.findField('cmhead_misc_per');\n var pv = parseFloat(_this.form.findField('cmhead_taxfree_value').getValue()) + \n parseFloat(_this.form.findField('cmhead_taxable_value').getValue()) ;\n var discount = parseFloat(_this.form.findField('cmhead_misc').getValue());\n \n if (discount > 0.0) {\n this.setValue(0); \n return;\n }\n if (pv < 0) {\n this.setValue(0); \n return;\n }\n var val = ((discount) / pv) * -100;\n \n //Roo.log(\"update discount?\" + val);\n this.setValue(val.toFixed(1));\n \n if (val > 0.0) {\n _this.form.findField('cmhead_misc_descrip').setValue(\"Discount of \" + val.toFixed(1)+'%');\n \n }\n \n \n}\n", "|xns": "Roo.form" }, { "listeners": { "keyup": "function (_self, e)\n{\n _this.form.findField('cmhead_misc_per').update();\n _this.form.findField('cmhead_total').recalc();\n}" }, "allowDecimals": true, "cls": "roo-align-right", "decimalPrecision": 3, "fieldLabel": " ", "name": "cmhead_misc", "width": 100, "xtype": "NumberField", "|xns": "Roo.form" } ] }, { "labelAlign": "top", "labelSeparator": " ", "width": 500, "xtype": "Row", "|xns": "Roo.form", "items": [ { "listeners": { "select": "function (combo, record, index)\n{\n _this.form.findField('cmhead_tax_value').setValue(\n record.data.taxzone_rate * _this.form.findField('cmhead_taxable_value').getValue()\n );\n}" }, "allowBlank": false, "displayField": "taxzone_descrip", "editable": false, "emptyText": "Select tax zone", "fieldLabel": "Tax Zone", "forceSelection": true, "hiddenName": "cmhead_taxzone_id", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "cmhead_taxzone_id_taxzone_descrip", "pageSize": 20, "qtip": "Select tax zone", "queryParam": "query[taxzone_descrip]", "selectOnFocus": true, "tpl": "
{taxzone_descrip}
", "triggerAction": "all", "typeAhead": true, "valueField": "taxzone_id", "width": 285, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n \n o.params.with_date = _this.form.findField('cmhead_docdate').getValue().format('Y-m-d');\n Roo.log(\"with date?\" + o.params.with_date);\n \n \n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'taxzone_descrip' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/taxzone.php'", "|xns": "Roo.data" }, { "*prop": "reader", "id": "taxzone_id", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[{'name':'taxzone_id','type':'int'},'taxzone_descrip']", "|xns": "Roo.data" } ] } ] }, { "allowDecimals": true, "cls": "roo-align-right", "decimalPrecision": 3, "fieldLabel": "Tax", "name": "cmhead_tax_value", "readOnly": true, "width": 100, "xtype": "NumberField", "|xns": "Roo.form" } ] }, { "labelAlign": "right", "labelWidth": 300, "width": 500, "xtype": "Row", "|xns": "Roo.form", "items": [ { "allowDecimals": true, "cls": "roo-align-right", "decimalPrecision": 3, "fieldLabel": "Total", "name": "cmhead_total", "readOnly": true, "width": 100, "xtype": "NumberField", "|recalc": "function() {\n var vals = _this.form.getValues();\n this.setValue(\n (1*vals.cmhead_taxable_value) + \n (1*vals.cmhead_taxfree_value) + \n (1*vals.cmhead_freight) + \n (1*vals.cmhead_tax_value) + \n (1*vals.cmhead_misc)\n );\n}\n", "|xns": "Roo.form" } ] } ] } ] }, { "legend": "Billing", "style": "width:420px", "xtype": "FieldSet", "|xns": "Roo.form", "items": [ { "xtype": "Column", "|xns": "Roo.form", "width": "420", "labelWidth": "50", "items": [ { "listeners": { "beforeselect": "function (combo, record, index)\n{\n // set _this.data values ..\n \n // just add everything...\n for(var i in record.data) {\n // Roo.log('cmhead_billto_cntct_id_' + i +' =' + record.data[i]);\n _this.data['cmhead_billto_cntct_id_' + i] = record.data[i];\n }\n\n _this.form.findField('billto_address').update();\n \n \n}", "add": "function (combo)\n{\n \n Pman.Dialog.XtupleQuickContact.show( \n {\n _id : id,\n customer_id : _this.form.findField('cmhead_cust_id').getValue()\n },\n \n function (data) {\n \n for(var i in data) {\n \n _this.data['cmhead_billto_cntct_id_' + i] = data[i];\n }\n \n _this.form.findField('billto_address').update();\n // fill in the select box..\n _this.form.setValues( {\n cmhead_billto_cntct_id : data.cntct_id,\n cmhead_billto_cntct_id_cntct_name : data.cntct_first_name + ' '+ \n data.cntct_last_name\n \n });\n }\n );\n // Pman.Dialog.XtupleCustomer.show(\n //{ cust_id : _this.form.findField('cohead_cust_id').getValue() }, \n //function(data) {\n // refresh the data in the pulldown..\n // }); \n\n}" }, "allowBlank": false, "alwaysQuery": true, "displayField": "cntct_name", "editable": true, "emptyText": "Select Contact", "fieldLabel": "Bill To (select)", "forceSelection": true, "hiddenName": "cmhead_billto_cntct_id", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "cmhead_billto_cntct_id_cntct_name", "pageSize": 20, "qtip": "Select Contact", "queryParam": "query[cntct_name]", "selectOnFocus": true, "tpl": "
{cntct_name} {cntct_addr_id_addr_line1}
", "triggerAction": "all", "typeAhead": true, "valueField": "cntct_id", "width": 300, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params._customer_id = _this.data.cmhead_cust_id;\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'cntct_name' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "xtype": "HttpProxy", "method": "GET", "|xns": "Roo.data", "|url": "baseURL + '/Roo/cntct.php'" }, { "*prop": "reader", "id": "cntct_id", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[{'name':'cntct_id','type':'int'},'cntct_name']", "|xns": "Roo.data" } ] } ] }, { "listeners": { "render": "function (_self)\n{\n Roo.log(this.el)\n \n \n \n this.el.on('click', function() { \n var id = _this.form.findField('cmhead_billto_cntct_id').getValue();\n Pman.Dialog.XtupleQuickContact.show( \n {\n _id : id,\n customer_id : _this.form.findField('cmhead_cust_id').getValue()\n },\n \n function (data) {\n \n for(var i in data) {\n \n _this.data['cmhead_billto_cntct_id_' + i] = data[i];\n }\n \n _this.form.findField('billto_address').update();\n // fill in the select box..\n _this.form.setValues( {\n cmhead_billto_cntct_id : data.cntct_id,\n cmhead_billto_cntct_id_cntct_name : data.cntct_first_name + ' '+ \n data.cntct_last_name\n });\n }\n );\n });\n}" }, "fieldLabel": "or enter Address", "name": "billto_address", "readOnly": true, "xtype": "TextArea", "|update": "function() {\n\n var c = ['first_name', 'last_name' ] ;\n var a = [ 'line1', 'line2', 'line3', 'city', 'state', 'country' ];\n var v = [];\n Roo.each(c, function(e) {\n if (_this.data['cmhead_billto_cntct_id_cntct_' +e] &&\n _this.data['cmhead_billto_cntct_id_cntct_' +e].length) {\n v.push(_this.data['cmhead_billto_cntct_id_cntct_' +e]);\n }\n });\n Roo.each(a, function(e) {\n if (_this.data['cmhead_billto_cntct_id_cntct_addr_id_addr_' +e] &&\n _this.data['cmhead_billto_cntct_id_cntct_addr_id_addr_' +e].length) {\n v.push(_this.data['cmhead_billto_cntct_id_cntct_addr_id_addr_' +e]);\n }\n });\n this.setValue(v.join(\"\\n\"));\n}\n", "|xns": "Roo.form" } ] } ] } ] }, { "name": "cmhead_id", "xtype": "Hidden", "|xns": "Roo.form" }, { "name": "cmhead_billto_addr_id", "xtype": "Hidden", "|xns": "Roo.form" }, { "name": "cmhead_posted", "xtype": "Hidden", "|xns": "Roo.form" }, { "name": "cmhead_cust_id", "xtype": "Hidden", "|xns": "Roo.form" }, { "name": "taxzone_rate", "xtype": "Hidden", "|xns": "Roo.form" }, { "name": "has_item", "xtype": "Hidden", "|xns": "Roo.form" } ] } ] }, { "listeners": { "deactivate": "function (_self)\n{\n if(_this.grid){\n _this.grid.stopEditing();\n }\n}", "activate": "function (_self)\n{\n\n _this.panel = this;\n \n try { if (MODULE.isBuilder) {\n return;\n } } catch(e) { }\n \n var id = _this.form.findField('cmhead_id').getValue() * 1;\n if (id < 1) {\n Roo.MessageBox.alert(\"Save First\", \"Save the order first, before adding items\");\n _this.dialog.layout.getRegion('center').showPanel(0);\n return;\n }\n if (_this.grid) {\n _this.grid.ds.load({});\n }\n\n}" }, "background": true, "fitContainer": true, "fitToframe": true, "region": "center", "tableName": "coitem", "title": "Credit Items", "xtype": "GridPanel", "|xns": "Roo", "items": [ { "listeners": { "|render": "function() \n{\n _this.grid = this; \n _this.hasQuery = 0;\n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.panel.active) {\n this.ds.load({});\n }\n}", "afteredit": "function (e)\n{\n //Roo.log('afteredit');\n //Roo.log(e);\n \n if (e.field == 'item_number' || e.originalValue == e.value) {\n // afterselect handles this...\n return;\n }\n var r = e.record;\n \n if ( r && r.data.cmitem_id) {\n // as we disable update to the display on the ajax callback to \n // allow editing flow to continue, and not refresh - we can only update\n // these values after something has actually been edited.\n r.set('coitem_id', r.data.cmitem_id);\n }\n \n var rate = 0;\n if(r.data.cmitem_taxtype_id_taxtype_name == 'Taxable' ){\n rate = _this.form.findField('taxzone_rate').getValue();\n }\n if(e.field == 'cmitem_tax_unitprice'){\n r.set('cmitem_unitprice', r.data.cmitem_tax_unitprice * 1 / (1 + rate * 1));\n// fields.push('cmitem_unitprice');\n }\n if(e.field == 'cmitem_unitprice'){\n r.set('cmitem_tax_unitprice', r.data.cmitem_unitprice * (1 + rate * 1) );\n// fields.push('cmitem_tax_unitprice');\n }\n if(e.field == 'cmitem_taxtype_id'){\n r.set('cmitem_tax_unitprice', r.data.cmitem_unitprice * (1 + rate * 1) );\n// fields.push('cmitem_tax_unitprice');\n \n }\n r.set('cmitem_tax_listprice', r.data.cmitem_item_listprice * (1 + rate * 1) );\n// fields.push('cmitem_tax_listprice');\n r.set('cmitem_line_value', r.data.cmitem_qtycredit * r.data.cmitem_unitprice );\n// fields.push('cmitem_line_value');\n r.set('cmitem_line_tax_value', r.data.cmitem_qtycredit * r.data.cmitem_tax_unitprice );\n// fields.push('cmitem_line_tax_value'); \n \n// fields.push('cmitem_id');\n \n _this.hasQuery += 1;\n \n var doupdate = function() { \n if (!_this.itemsUpdating) {\n Roo.log('doupdate...');\n \n _this.hasQuery -= 1;\n r.commit();\n return;\n }\n doupdate.defer(1000);\n }\n \n doupdate();\n \n \n}", "beforeedit": "function (e)\n{\n // we can only edit if nothing is assigned to shipping or invoices..\n if (_this.form.findField('cmhead_posted').getValue() == 'true') {\n Roo.MessageBox.alert(\"Error\", \"credit memo is already posted\");\n e.cancel = true;\n return;\n }\n \n return;\n \n // seems below logic is useless...!!!!\n var rec = e.record;\n\n if (rec.data.coitem_qtyshipped > 0 || rec.data.cobill_billed > 0) {\n Roo.MessageBox.alert(\"Error\", \"That item has been shipped or invoices - void the shipments/invoices first\");\n e.cancel = true;\n return;\n }\n \n if (rec.data.coitem_subnumber * 1 > 0) {\n Roo.log(\"Edit container event\");\n Roo.log(e); // if it's a tab.. \n\n \n switch(e.field) {\n // allow editing of source / destination..\n case 'coitem_shipto_id':\n case 'coitem_location_src': \n return;\n default : \n break;\n }\n Roo.MessageBox.alert(\"Error\", \"That is a kit item, edit the container.\");\n e.cancel = true;\n return;\n }\n // zero off values..\n //if (e.field == 'coitem_qtyord' && rec.data.coitem_qtyord == 0) {\n // e.value ='';\n // }\n // if (e.field == 'coitem_custprice' && rec.data.coitem_qtyord == 0.0) {\n // e.value ='';\n // }\n \n if (rec.data.item_type == 'K' && e.field == 'item_number') {\n // you can not change the product type on kits' as it messing things up..\n Roo.MessageBox.alert(\"Error\", \"That is a kit item,if you need to change it, delete it first.\");\n e.cancel = true;\n return;\n }\n \n}", "celldblclick": "function (_self, rowIndex, columnIndex, e)\n{\n var rec = this.ds.getAt(rowIndex);\n var di = this.cm.getDataIndex(columnIndex);\n if (di != 'avail_qty') {\n return;\n }\n Pman.Dialog.XtupleInvHistory.show({\n itemsite_item_id_item_number : rec.data.item_number,\n // itemsite_item_id_item_descript1 : rec.data.item_descrip1,\n location_name : rec.data.coitem_location_src_location_name,\n location_descrip : rec.data.coitem_location_src_location_descrip,\n \n invhist_transdate : _this.form.findField('cohead_targetdate').getValue() \n }); \n \n}", "rowclass": "function (gridview, rowcfg)\n{\n if (rowcfg.record.data.coitem_status == 'C' &&\n rowcfg.record.data.shipitem_shipped * 1 < 1) {\n \n rowcfg.rowClass = 'strikethrough';\n }\n if (rowcfg.record.data.coitem_status == 'X' ) {\n \n rowcfg.rowClass = 'strikethrough';\n }\n // Roo.log(rowcfg);\n// shipitem_shipped\n}" }, "*prop": "grid", "autoExpandColumn": "cmitem_comments", "clicksToEdit": 1, "loadMask": true, "xtype": "EditorGrid", "|loadAvail": "function() {\n \n return; //not used.\n \n var q = [];\n this.ds.each( function(r) {\n \n // only update if we do not have the details.\n if (r.data.avail_qty == 0) {\n \n }\n q.push( { \n item : r.data.item_number, \n loc: r.data.coitem_location_src_location_name,\n id: r.data.coitem_linenumber + (r.data.coitem_subnumber ? ('.' + r.data.coitem_subnumber) : '')\n } );\n });\n \n // needs to be a post to allow long lists of products..\n \n new Pman.Request({\n url : baseURL + '/Roo/itemloc',\n method : 'POST',\n mask : \"Loading available qty\",\n maskel : _this.grid.view.el,\n params : {\n _availqty : Roo.encode(q),\n curr_id : _this.form.findField('cohead_curr_id').getValue()\n },\n success : function(d) \n {\n _this.grid.ds.each(function(r) { \n var id = r.data.coitem_linenumber + (r.data.coitem_subnumber ? ('.' + r.data.coitem_subnumber) : '');\n \n \n if (typeof(d.data[id]) == 'undefined') {\n return;\n }\n r.set('avail_qty', d.data[id].qty);\n if (r.data.coitem_unitcost_in_order_cur * 1.0 < 0.1) {\n r.set('coitem_unitcost_in_order_cur', d.data[id].unitcost);\n }\n \n });\n \n }\n });\n \n \n \n}\n", "|xns": "Roo.grid", "items": [ { "listeners": { "tabend": "function (_self)\n{\n _this.addItemBtn.fireEvent('click', _this.addItemBtn);\n}", "beforeeditnext": "function (eventdata)\n{\n return;\n // this does not work, as the reload effect cancels editng.\n var rec = _this.grid.ds.getAt(eventdata.cell[0]);\n if (rec.data.coitem_subnumber *1 < 0 ) {\n return;\n }\n var r = eventdata.cell[0] + 1;\n\n while (true) {\n if (r > _this.grid.ds.getCount()-1 ) {\n eventdata.cell = false;\n return;\n }\n rec = _this.grid.ds.getAt(r);\n if (rec.data.coitem_subnumber *1 < 0 ) {\n eventdata.cell = [ r, eventdata.cell[1] ];\n return;\n }\n r++;\n }\n \n \n \n\n}" }, "*prop": "sm", "enter_is_tab": true, "xtype": "CellSelectionModel", "|xns": "Roo.grid" }, { "listeners": { "|beforeload": "function (_self,o) {\n\n try {\n this.removeAll();\n } catch (e) { }\n \n Roo.log(_this.data);\n if (!_this.data || !_this.data.cmhead_id) {\n return false;\n }\n o.params = o.params || {};\n Roo.log(_this.data);\n o.params.cmitem_cmhead_id = _this.data.cmhead_id;\n o.params.limit = 999;\n \n}", "update": "function (_self, rec, operation)\n{\n \n if (operation != Roo.data.Record.COMMIT) {\n return;\n }\n \n // row has been updated..\n // if the qty + item has been filled in, we should try and save it..\n if (!(rec.data.cmitem_itemsite_id * 1) || !(rec.data.cmitem_qtycredit*1) || !(rec.data.cmitem_unitprice*1)) {\n Roo.log('not saving - row not completed');\n return;\n }\n\n if (_this.itemsUpdating) {\n Roo.log('currently updating?');\n return;\n }\n _this.itemsUpdating = true;\n\n\n Roo.log('Running update'); \n \n new Pman.Request({\n url : baseURL+'/Roo/Cmitem',\n method : 'POST',\n \n params : rec.data,\n success: function(res)\n {\n Roo.log('GOT success');\n // update the data...\n if (rec.data.item_type == 'K') {\n _this.itemsUpdating = false; \n _this.grid.ds.load({});\n return;\n }\n if (_this.grid.activeEditor) {\n rec.editing = true;\n } \n rec.set('cmitem_id', res.data.cmitem_id);\n \n _this.itemsUpdating = false; \n \n if(_this.hasQuery != 0){\n \n return;\n }\n \n rec.dirty = false;\n delete rec.modified;\n \n _this.grid.loadAvail();\n \n },\n failure : function(res)\n {\n Roo.MessageBox.alert(res.message);\n _this.itemsUpdating = false;\n }\n \n \n });\n \n \n \n \n \n}", "load": "function (_self, records, options)\n{\n // need to fetch availablity from master data..\n // build a list of what to ask..\n Roo.log(records);\n // query: ITEM CODE - LOCATION\n \n //_this.grid.loadAvail.defer(100, _this.grid);\n var rate = 0;\n \n Roo.each(records, function(r){\n rate = 0;\n if(r.data.cmitem_taxtype_id == r.data.cmitem_taxable_id ){\n rate = _this.form.findField('taxzone_rate').getValue();\n }\n r.set('cmitem_tax_unitprice', r.data.cmitem_unitprice * (1 + rate * 1));\n r.set('cmitem_tax_listprice', r.data.cmitem_item_listprice * (1 + rate * 1));\n r.set('cmitem_line_tax_value', r.data.cmitem_line_value * (1 + rate * 1));\n }) \n \n}" }, "*prop": "dataSource", ".builderCfg": "{\"cols\":[{\"table\":\"coitem\",\"column\":\"coitem_linenumber\",\"columnshort\":\"coitem_linenumber\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Item#\"},{\"table\":\"coitem\",\"column\":\"coitem_itemsite_id\",\"columnshort\":\"coitem_itemsite_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"itemsite_id\",\"deps\":[{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_item_id\",\"columnshort\":\"itemsite_item_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_warehous_id\",\"columnshort\":\"itemsite_warehous_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_qtyonhand\",\"columnshort\":\"itemsite_qtyonhand\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_reorderlevel\",\"columnshort\":\"itemsite_reorderlevel\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_ordertoqty\",\"columnshort\":\"itemsite_ordertoqty\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_cyclecountfreq\",\"columnshort\":\"itemsite_cyclecountfreq\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_datelastcount\",\"columnshort\":\"itemsite_datelastcount\",\"ctype\":\"date\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_datelastused\",\"columnshort\":\"itemsite_datelastused\",\"ctype\":\"date\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_loccntrl\",\"columnshort\":\"itemsite_loccntrl\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_safetystock\",\"columnshort\":\"itemsite_safetystock\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_minordqty\",\"columnshort\":\"itemsite_minordqty\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_multordqty\",\"columnshort\":\"itemsite_multordqty\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_leadtime\",\"columnshort\":\"itemsite_leadtime\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_abcclass\",\"columnshort\":\"itemsite_abcclass\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_issuemethod\",\"columnshort\":\"itemsite_issuemethod\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_controlmethod\",\"columnshort\":\"itemsite_controlmethod\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_active\",\"columnshort\":\"itemsite_active\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_plancode_id\",\"columnshort\":\"itemsite_plancode_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_costcat_id\",\"columnshort\":\"itemsite_costcat_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_eventfence\",\"columnshort\":\"itemsite_eventfence\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_sold\",\"columnshort\":\"itemsite_sold\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_stocked\",\"columnshort\":\"itemsite_stocked\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_freeze\",\"columnshort\":\"itemsite_freeze\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_location_id\",\"columnshort\":\"itemsite_location_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_useparams\",\"columnshort\":\"itemsite_useparams\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_useparamsmanual\",\"columnshort\":\"itemsite_useparamsmanual\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_soldranking\",\"columnshort\":\"itemsite_soldranking\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_createpr\",\"columnshort\":\"itemsite_createpr\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_location\",\"columnshort\":\"itemsite_location\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_location_comments\",\"columnshort\":\"itemsite_location_comments\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_notes\",\"columnshort\":\"itemsite_notes\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_perishable\",\"columnshort\":\"itemsite_perishable\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_nnqoh\",\"columnshort\":\"itemsite_nnqoh\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_autoabcclass\",\"columnshort\":\"itemsite_autoabcclass\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_ordergroup\",\"columnshort\":\"itemsite_ordergroup\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_disallowblankwip\",\"columnshort\":\"itemsite_disallowblankwip\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_maxordqty\",\"columnshort\":\"itemsite_maxordqty\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_mps_timefence\",\"columnshort\":\"itemsite_mps_timefence\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_createwo\",\"columnshort\":\"itemsite_createwo\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_warrpurc\",\"columnshort\":\"itemsite_warrpurc\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_autoreg\",\"columnshort\":\"itemsite_autoreg\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_costmethod\",\"columnshort\":\"itemsite_costmethod\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_value\",\"columnshort\":\"itemsite_value\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_ordergroup_first\",\"columnshort\":\"itemsite_ordergroup_first\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_supply_itemsite_id\",\"columnshort\":\"itemsite_supply_itemsite_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_planning_type\",\"columnshort\":\"itemsite_planning_type\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_wosupply\",\"columnshort\":\"itemsite_wosupply\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_posupply\",\"columnshort\":\"itemsite_posupply\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_lsseq_id\",\"columnshort\":\"itemsite_lsseq_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_cosdefault\",\"columnshort\":\"itemsite_cosdefault\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_createsopr\",\"columnshort\":\"itemsite_createsopr\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_createsopo\",\"columnshort\":\"itemsite_createsopo\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_dropship\",\"columnshort\":\"itemsite_dropship\",\"ctype\":\"bool\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"coitem\",\"column\":\"coitem_qtyord\",\"columnshort\":\"coitem_qtyord\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Qty\"},{\"table\":\"coitem\",\"column\":\"coitem_unitcost\",\"columnshort\":\"coitem_unitcost\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Unit Cost\"},{\"table\":\"coitem\",\"column\":\"coitem_price\",\"columnshort\":\"coitem_price\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Price\"},{\"table\":\"coitem\",\"column\":\"coitem_custprice\",\"columnshort\":\"coitem_custprice\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Cust Price\"},{\"table\":\"coitem\",\"column\":\"coitem_qtyreturned\",\"columnshort\":\"coitem_qtyreturned\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"#Returned\"},{\"table\":\"coitem\",\"column\":\"coitem_prcost\",\"columnshort\":\"coitem_prcost\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"prcost?\"},{\"table\":\"coitem\",\"column\":\"coitem_price_uom_id\",\"columnshort\":\"coitem_price_uom_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"uom_id\",\"deps\":[{\"table\":\"uom\",\"column\":\"coitem_price_uom_id_uom_name\",\"columnshort\":\"uom_name\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"uom\",\"column\":\"coitem_price_uom_id_uom_descrip\",\"columnshort\":\"uom_descrip\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"uom\",\"column\":\"coitem_price_uom_id_uom_item_weight\",\"columnshort\":\"uom_item_weight\",\"ctype\":\"bool\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"Unit of\"},{\"table\":\"coitem\",\"column\":\"coitem_qtyreserved\",\"columnshort\":\"coitem_qtyreserved\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"#reserved\"}],\"cols_ex\":[\"coitem_price_uom_id_uom_descrip\"],\"table\":\"coitem\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'cmitem_linenumber', direction: 'ASC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/Cmitem.php'", "|xns": "Roo.data" }, { "|xns": "Roo.data", "xtype": "JsonReader", "totalProperty": "total", "root": "data", ".builderCfg": "{\"cols\":[{\"table\":\"coitem\",\"column\":\"coitem_linenumber\",\"columnshort\":\"coitem_linenumber\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Item#\"},{\"table\":\"coitem\",\"column\":\"coitem_itemsite_id\",\"columnshort\":\"coitem_itemsite_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"itemsite_id\",\"deps\":[{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_item_id\",\"columnshort\":\"itemsite_item_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_warehous_id\",\"columnshort\":\"itemsite_warehous_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_qtyonhand\",\"columnshort\":\"itemsite_qtyonhand\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_reorderlevel\",\"columnshort\":\"itemsite_reorderlevel\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_ordertoqty\",\"columnshort\":\"itemsite_ordertoqty\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_cyclecountfreq\",\"columnshort\":\"itemsite_cyclecountfreq\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_datelastcount\",\"columnshort\":\"itemsite_datelastcount\",\"ctype\":\"date\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_datelastused\",\"columnshort\":\"itemsite_datelastused\",\"ctype\":\"date\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_loccntrl\",\"columnshort\":\"itemsite_loccntrl\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_safetystock\",\"columnshort\":\"itemsite_safetystock\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_minordqty\",\"columnshort\":\"itemsite_minordqty\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_multordqty\",\"columnshort\":\"itemsite_multordqty\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_leadtime\",\"columnshort\":\"itemsite_leadtime\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_abcclass\",\"columnshort\":\"itemsite_abcclass\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_issuemethod\",\"columnshort\":\"itemsite_issuemethod\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_controlmethod\",\"columnshort\":\"itemsite_controlmethod\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_active\",\"columnshort\":\"itemsite_active\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_plancode_id\",\"columnshort\":\"itemsite_plancode_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_costcat_id\",\"columnshort\":\"itemsite_costcat_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_eventfence\",\"columnshort\":\"itemsite_eventfence\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_sold\",\"columnshort\":\"itemsite_sold\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_stocked\",\"columnshort\":\"itemsite_stocked\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_freeze\",\"columnshort\":\"itemsite_freeze\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_location_id\",\"columnshort\":\"itemsite_location_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_useparams\",\"columnshort\":\"itemsite_useparams\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_useparamsmanual\",\"columnshort\":\"itemsite_useparamsmanual\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_soldranking\",\"columnshort\":\"itemsite_soldranking\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_createpr\",\"columnshort\":\"itemsite_createpr\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_location\",\"columnshort\":\"itemsite_location\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_location_comments\",\"columnshort\":\"itemsite_location_comments\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_notes\",\"columnshort\":\"itemsite_notes\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_perishable\",\"columnshort\":\"itemsite_perishable\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_nnqoh\",\"columnshort\":\"itemsite_nnqoh\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_autoabcclass\",\"columnshort\":\"itemsite_autoabcclass\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_ordergroup\",\"columnshort\":\"itemsite_ordergroup\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_disallowblankwip\",\"columnshort\":\"itemsite_disallowblankwip\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_maxordqty\",\"columnshort\":\"itemsite_maxordqty\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_mps_timefence\",\"columnshort\":\"itemsite_mps_timefence\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_createwo\",\"columnshort\":\"itemsite_createwo\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_warrpurc\",\"columnshort\":\"itemsite_warrpurc\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_autoreg\",\"columnshort\":\"itemsite_autoreg\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_costmethod\",\"columnshort\":\"itemsite_costmethod\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_value\",\"columnshort\":\"itemsite_value\",\"ctype\":\"numeric\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_ordergroup_first\",\"columnshort\":\"itemsite_ordergroup_first\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_supply_itemsite_id\",\"columnshort\":\"itemsite_supply_itemsite_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_planning_type\",\"columnshort\":\"itemsite_planning_type\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_wosupply\",\"columnshort\":\"itemsite_wosupply\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_posupply\",\"columnshort\":\"itemsite_posupply\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_lsseq_id\",\"columnshort\":\"itemsite_lsseq_id\",\"ctype\":\"int4\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_cosdefault\",\"columnshort\":\"itemsite_cosdefault\",\"ctype\":\"bpchar\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_createsopr\",\"columnshort\":\"itemsite_createsopr\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_createsopo\",\"columnshort\":\"itemsite_createsopo\",\"ctype\":\"bool\",\"desc\":\"\"},{\"table\":\"itemsite\",\"column\":\"coitem_itemsite_id_itemsite_dropship\",\"columnshort\":\"itemsite_dropship\",\"ctype\":\"bool\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"coitem\",\"column\":\"coitem_qtyord\",\"columnshort\":\"coitem_qtyord\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Qty\"},{\"table\":\"coitem\",\"column\":\"coitem_unitcost\",\"columnshort\":\"coitem_unitcost\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Unit Cost\"},{\"table\":\"coitem\",\"column\":\"coitem_price\",\"columnshort\":\"coitem_price\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Price\"},{\"table\":\"coitem\",\"column\":\"coitem_custprice\",\"columnshort\":\"coitem_custprice\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Cust Price\"},{\"table\":\"coitem\",\"column\":\"coitem_qtyreturned\",\"columnshort\":\"coitem_qtyreturned\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"#Returned\"},{\"table\":\"coitem\",\"column\":\"coitem_prcost\",\"columnshort\":\"coitem_prcost\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"prcost?\"},{\"table\":\"coitem\",\"column\":\"coitem_price_uom_id\",\"columnshort\":\"coitem_price_uom_id\",\"ctype\":\"int4\",\"desc\":\"\",\"maps_to\":\"uom_id\",\"deps\":[{\"table\":\"uom\",\"column\":\"coitem_price_uom_id_uom_name\",\"columnshort\":\"uom_name\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"uom\",\"column\":\"coitem_price_uom_id_uom_descrip\",\"columnshort\":\"uom_descrip\",\"ctype\":\"text\",\"desc\":\"\"},{\"table\":\"uom\",\"column\":\"coitem_price_uom_id_uom_item_weight\",\"columnshort\":\"uom_item_weight\",\"ctype\":\"bool\",\"desc\":\"\"}],\"use\":1,\"use_ex\":\"\",\"title\":\"Unit of\"},{\"table\":\"coitem\",\"column\":\"coitem_qtyreserved\",\"columnshort\":\"coitem_qtyreserved\",\"ctype\":\"numeric\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"#reserved\"}],\"cols_ex\":[\"coitem_price_uom_id_uom_descrip\"],\"table\":\"coitem\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}", "*prop": "reader", "id": "id", "|fields": "[\n {\n 'name': 'coitem_linenumber',\n 'type': 'int'\n },\n {\n 'name': 'coitem_itemsite_id',\n 'type': 'int'\n },\n {\n 'name': 'coitem_qtyord'\n },\n {\n 'name': 'coitem_unitcost'\n },\n {\n 'name': 'coitem_price'\n },\n {\n 'name': 'coitem_custprice'\n },\n {\n 'name': 'coitem_qtyreturned'\n },\n {\n 'name': 'coitem_prcost'\n },\n {\n 'name': 'coitem_price_uom_id',\n 'type': 'int'\n },\n {\n 'name': 'coitem_qtyreserved'\n }\n]" } ] }, { "*prop": "toolbar", "xtype": "Toolbar", "|xns": "Roo", "items": [ { "listeners": { "|click": "function()\n{\n \n \n if (_this.form.findField('cmhead_posted').getValue() == 'true') {\n Roo.MessageBox.alert(\"Error\", \"credit memo is already posted\");\n return;\n }\n // work out last \n // work out last \n var grid = _this.grid;\n var last = 0;\n \n _this.grid.ds.each(function(r) {\n last = r.data.cmitem_linenumber;\n });\n \n last++;\n grid.stopEditing();\n var nr = _this.grid.ds.reader.newRow({\n cmitem_linenumber : last,\n item_number : '',\n item_descrip1 : '',\n cmitem_cmhead_id : _this.form.findField('cmhead_id').getValue(),\n cmitem_comments : '',\n cmitem_taxtype_id : _this.data.default_taxtype_id,\n cmitem_taxtype_id_taxtype_name : 'Taxable'\n });\n grid.stopEditing();\n grid.ds.insert(grid.ds.getCount(), nr); \n grid.startEditing(grid.ds.getCount()-1, 1); // type..\n}\n", "render": "function (_self)\n{\n _this.addItemBtn = _self;\n}" }, "cls": "x-btn-text-icon", "text": "Add", "xtype": "Button", "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'", "|xns": "Roo.Toolbar" }, { "listeners": { "click": "function (_self, e)\n{\n \n var last = 1; \n _this.grid.ds.each(function(r) {\n last = r.data.cmitem_linenumber +1;\n\n \n });\n \n var grid = _this.grid;\n var ct = _this.grid.ds.getCount();\r\n var lastrow = ct ? _this.grid.ds.getAt(ct-1) : false;\r\n \r\n var cmhead_cust_id = _this.form.findField('cmhead_cust_id').getValue();\n var cmhead_id = _this.form.findField('cmhead_id').getValue();\n \n Pman.Dialog.XtupleSalesProductList.show( {cohead_cust_id : cmhead_cust_id, cmhead_id : cmhead_id} , function(res) {\n \n Roo.log(res);\n grid.stopEditing();\n\n if (lastrow) {\n var lr = lastrow;\n if (!lr.data.cmitem_itemsite_id) {\n lr.set('cmitem_itemsite_id', res.item_itemsite_id_itemsite_id);\n lr.set('item_number', res.item_number);\n lr.set('item_descrip1', res.item_descrip1); \n lr.set('cmitem_comments', res.item_descrip1);\n lr.set('cmitem_cmhead_id', _this.form.findField('cmhead_id').getValue());\n return;\n }\n }\n var rate = _this.form.findField('taxzone_rate').getValue();\r\n var nr = grid.ds.reader.newRow({\n cmitem_linenumber : last,\n cmitem_itemsite_id : res.item_itemsite_id_itemsite_id,\n item_number : res.item_number,\n item_descrip1 : res.item_descrip1 ,\n cmitem_cmhead_id : _this.form.findField('cmhead_id').getValue(),\n cmitem_comments : res.item_descrip1,\n cmitem_tax_listprice : res.item_price * ( 1 + rate * 1),\n cmitem_item_listprice : res.item_price,\n cmitem_tax_unitprice : res.item_price * ( 1 + rate * 1),\n cmitem_unitprice : res.item_price,\n cmitem_qtycredit : 1,\n cmitem_line_value : res.item_price,\n cmitem_line_tax_value : res.item_price * ( 1 + rate * 1)\n \n });\n grid.ds.insert(grid.ds.getCount(), nr);\n \n var ar = grid.ds.getAt(grid.ds.getCount() - 1);\n ar.commit();\n \n }); \n}" }, "cls": "x-btn-text-icon", "text": "Find Products", "xtype": "Button", "|icon": "rootURL + '/Pman/templates/images/search.gif'", "|xns": "Roo.Toolbar" }, { "listeners": { "click": "function ()\n{\n var cmhead_id = 1 * _this.form.findField('cmhead_id').getValue();\n if (!cmhead_id) {\n Roo.MessageBox.alert(\"Error\", \"Save credit memo first!\");\n return;\n \n }\n \n new Pman.Download({\n url : baseURL + '/Roo/Metasql',\n method : 'GET',\n timeout: 600000,\n params : {\n _group : 'cmhead',\n _name : 'items',\n 'cmhead_id:number' : cmhead_id,\n csvCols : '*',\n csvTitles : '*', \n limit : 9999 \n }\n }); \n \n \n}" }, "cls": "x-btn-text-icon", "text": "Download Excel", "xtype": "Button", "|icon": "rootURL + '/Pman/templates/images/spreadsheet.gif'", "|xns": "Roo.Toolbar" }, { "listeners": { "|click": "function (_self, e)\n{\n \n if (_this.form.findField('cmhead_posted').getValue() == 'true') {\n Roo.MessageBox.alert(\"Error\", \"credit memo is already posted\");\n return;\n }\n \n Pman.Dialog.Image.show(\n {\n _url : baseURL + '/Xtuple/Import/CreditMemo',\n onid : _this.form.findField('cmhead_id').getValue()\n \n },\n function (res) {\n _this.grid.ds.load({});\r\n }\n );\n}", "render": "function (_self)\n{\n _this.uploadBtn = _self;\n}" }, "cls": "x-btn-text-icon", "text": "Upload Excel", "xtype": "Button", "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'", "|xns": "Roo.Toolbar" }, { "xtype": "Fill", "|xns": "Roo.Toolbar" }, { "listeners": { "|click": "function()\n{\n _this.grid.stopEditing();\n // check that no shipments or invoices are done..\n if (_this.form.findField('cmhead_posted').getValue() == 'true') {\n Roo.MessageBox.alert(\"Error\", \"credit memo is already posted\");\n return;\n }\n // check that no shipments or invoices are done..\n var rc = _this.grid.getSelectionModel().getSelectedCell();\n \n var rec = _this.grid.ds.getAt(rc[0]);\n \n Roo.MessageBox.confirm(\"Confirm\", \"Are you sure you want to delete that line?\", function(r)\n {\n if (r != 'yes') {\n return;\n }\n remove();\n });\n \n if (!rec.data.cmitem_id) {\n _this.grid.ds.remove(rec);\n return;\n }\n function remove()\n {\n new Pman.Request({\n url : baseURL + '/Roo/cmitem',\n method : 'POST',\n params : {\n _delete : rec.data.cmitem_id\n \n },\n success : function() {\n if (rec.data.item_type == 'K') {\n _this.grid.ds.load({});\n return;\n }\n _this.grid.ds.remove(rec);\n }\n \n });\n }\n\n \n \n}\n " }, "cls": "x-btn-text-icon", "text": "Delete", "xtype": "Button", "|icon": "rootURL + '/Pman/templates/images/trash.gif'", "|xns": "Roo.Toolbar" } ] }, { "*prop": "colModel[]", ".builderCfg": "{\"table\":\"coitem\",\"column\":\"coitem_linenumber\",\"columnshort\":\"coitem_linenumber\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Item#\"}", "dataIndex": "cmitem_linenumber", "header": "Item#", "width": 60, "xtype": "ColumnModel", "|renderer": "function(v,x,r) {\n\n if (r.data.coitem_subnumber * 1 > 0) {\n return String.format('{0}.{1}', v,r.data.coitem_subnumber);\n }\n return String.format('{0}', v);\n }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "item_number", "header": "Item Code", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid", "items": [ { "|xns": "Roo.grid", "xtype": "GridEditor", "*prop": "editor", "items": [ { "listeners": { "beforeselect": "function (combo, record, index)\n{\n // set _this.data values ..\n var ar = _this.grid.activeEditor.record;\n //Roo.log('beforeselect');\n \n var rate = _this.form.findField('taxzone_rate').getValue();\n \n (function() { \n \n ar.set('item_descrip1', record.data.itemsite_item_id_item_descrip1);\n ar.set('cmitem_comments', record.data.itemsite_item_id_item_descrip1); \n ar.set('cmitem_tax_listprice', record.data.item_listprice * ( 1 + rate * 1) );\n ar.set('cmitem_item_listprice', record.data.item_listprice * 1);\n ar.set('cmitem_tax_unitprice', record.data.item_price * ( 1 + rate * 1) );\n ar.set('cmitem_unitprice', record.data.item_price * 1);\n ar.set('cmitem_qtycredit', 1);\n ar.set('cmitem_line_value', record.data.item_price * ar.data.cmitem_qtycredit);\n ar.set('cmitem_line_tax_value', ar.data.cmitem_tax_unitprice * ar.data.cmitem_qtycredit);\n ar.set('cmitem_itemsite_id', record.data.itemsite_id);\n ar.set('item_number', record.data.itemsite_item_id_item_number);\n ar.set('item_type', record.data.itemsite_item_id_item_type);\n ar.set('avail_qty', 0);\n // ar.updateFields = ['All'];\n ar.commit();\n }).defer(100);\n \n}" }, "*prop": "field", "allowBlank": false, "displayField": "itemsite_item_id_item_number", "editable": true, "emptyText": "Select item", "forceSelection": true, "hiddenName": "itemsite_item_id_item_number", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "item_number", "pageSize": 20, "qtip": "Select item", "queryParam": "query[number]", "selectOnFocus": true, "tpl": "
{itemsite_item_id_item_number} ${item_price:toFixed(2)}- {itemsite_item_id_item_descrip1}
", "triggerAction": "all", "typeAhead": false, "valueField": "item_number", "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n o.params.customer_id = _this.form.findField('cmhead_cust_id').getValue();\n o.params['query[cmhead_id]'] = _this.form.findField('cmhead_id').getValue();\n //o.params.shipto_cust_id = _this.data.cohead_cust_id;\n // set more here\n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'item_number' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/itemsite.php'", "|xns": "Roo.data" }, { "*prop": "reader", "id": "shipto_id", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[{'name':'item_id','type':'int'},'item_number']", "|xns": "Roo.data" } ] } ] } ] } ] }, { "*prop": "colModel[]", "dataIndex": "cmitem_comments", "header": "Item Description", "width": "150.00", "xtype": "ColumnModel", "|renderer": "function(v,x,r) { \n\n if (!v.length) {\n r.set('cmitem_comments', r.data.item_descrip1);\n v = r.data.item_descrip1;\n }\n if (v && v.length > 49) {\n return String.format('{0}', v);\n }\n return String.format('{0}', v); \n \n}", "|xns": "Roo.grid", "items": [ { "|xns": "Roo.grid", "xtype": "GridEditor", "*prop": "editor", "items": [ { "*prop": "field", "allowBlank": false, "xtype": "TextField", "|xns": "Roo.form" } ] } ] }, { "*prop": "colModel[]", "align": "right", "dataIndex": "cmitem_qtycredit", "header": "Qty", "width": 50, "xtype": "ColumnModel", "|renderer": "function(v)\n{\n return String.format('{0}', v ? parseInt(v) : '');\n}", "|xns": "Roo.grid", "items": [ { "*prop": "editor", "xtype": "GridEditor", "|xns": "Roo.grid", "items": [ { "listeners": { "focus": "function (_self)\n{\n if (this.value == 0) {\n this.el.dom.value = '';\n }\n}" }, "*prop": "field", "allowDecimals": false, "decimalPrecision": 0, "minValue": 1, "style": "text-align:right", "xtype": "NumberField", "|xns": "Roo.form" } ] } ] }, { "*prop": "colModel[]", ".builderCfg": "{\"table\":\"coitem\",\"column\":\"coitem_linenumber\",\"columnshort\":\"coitem_linenumber\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"Item#\"}", "align": "right", "dataIndex": "cmitem_tax_listprice", "header": "List Price w. tax", "width": 80, "xtype": "ColumnModel", "|renderer": "function(v,x,r)\n{\n // var rate = _this.form.findField('taxzone_rate').getValue();\n // v = v * (1 + rate * 1);\n \n return String.format('{0}', v ? parseFloat(v).toFixed(2) : '');\n}", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "align": "right", "dataIndex": "cmitem_taxtype_id", "header": "Taxed", "width": 50, "xtype": "ColumnModel", "|renderer": "function(v,x,r) { return String.format('{0}', r.data.cmitem_taxtype_id_taxtype_name); }", "|xns": "Roo.grid", "items": [ { "|xns": "Roo.grid", "xtype": "GridEditor", "*prop": "editor", "items": [ { "*prop": "field", "allowBlank": false, "displayField": "taxtype_name", "editable": false, "emptyText": "Select Tax Type", "forceSelection": true, "hiddenName": "cmitem_taxtype_id", "listWidth": 400, "loadingText": "Searching...", "minChars": 2, "name": "cmitem_taxtype_id_taxtype_name", "pageSize": 20, "qtip": "Select taxtype", "queryParam": "query[taxtype_id]", "selectOnFocus": true, "tpl": "
{taxtype_name}
", "triggerAction": "all", "typeAhead": true, "valueField": "taxtype_id", "width": 285, "xtype": "ComboBox", "|xns": "Roo.form", "items": [ { "listeners": { "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n \n/* o.params.with_date = _this.form.findField('cohead_orderdate').getValue().format('Y-m-d'); \n Roo.log(\"with date?\" + o.params.with_date);*/\n \n \n}\n" }, "*prop": "store", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ direction : 'ASC', field: 'taxtype_name' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/taxtype.php'", "|xns": "Roo.data" }, { "*prop": "reader", "id": "taxtype_id", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[{'name':'taxtype_id','type':'int'},'taxtype_name']", "|xns": "Roo.data" } ] } ] } ] } ] }, { "*prop": "colModel[]", "align": "right", "dataIndex": "cmitem_tax_unitprice", "header": "Unit Price w. tax", "width": 90, "xtype": "ColumnModel", "|renderer": "function(v,x,r)\n{\n return String.format('{0}', v ? parseFloat(v).toFixed(2) : '');\n}", "|xns": "Roo.grid", "items": [ { "|xns": "Roo.grid", "xtype": "GridEditor", "*prop": "editor", "items": [ { "listeners": { "focus": "function (_self)\n{\n if (this.value == 0.0) {\n this.el.dom.value = '';\n }\n}" }, "*prop": "field", "decimalPrecision": 2, "minValue": 0, "style": "text-align:right", "xtype": "NumberField", "|xns": "Roo.form" } ] } ] }, { "*prop": "colModel[]", "align": "right", "dataIndex": "cmitem_unitprice", "header": "Unit Price", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v)\n{\n return String.format('{0}', v ? parseFloat(v).toFixed(2) : '');\n}", "|xns": "Roo.grid", "items": [ { "|xns": "Roo.grid", "xtype": "GridEditor", "*prop": "editor", "items": [ { "listeners": { "focus": "function (_self)\n{\n if (this.value == 0.0) {\n this.el.dom.value = '';\n }\n}" }, "*prop": "field", "decimalPrecision": 2, "minValue": 0, "style": "text-align:right", "xtype": "NumberField", "|xns": "Roo.form" } ] } ] }, { "*prop": "colModel[]", "align": "right", "dataIndex": "cmitem_line_value", "header": "Total", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v)\n{\n return String.format('{0}', v ? parseFloat(v).toFixed(2) : '');\n}", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "align": "right", "dataIndex": "cmitem_line_tax_value", "header": "Total w. tax", "width": 80, "|renderer": "function(v,x,r)\n{\n return String.format('{0}', v ? parseFloat(v).toFixed(2) : '');\n}", "|xns": "Roo.grid" } ] } ] }, { "listeners": { "|activate": "function() {\n _this.cpanel = this;\n \n var id = _this.form.findField('cmhead_id').getValue() * 1;\n if (id < 1) {\n Roo.MessageBox.alert(\"Error\", \"save the credit memo first!\");\n _this.dialog.layout.getRegion('center').showPanel(0);\n return;\n }\n \n if (_this.cgrid) {\n _this.cgrid.footer.onClick('first');\n }\n}" }, "background": true, "fitContainer": true, "fitToframe": true, "region": "center", "tableName": "checkitem", "title": "Miscellaneous Check", "xtype": "GridPanel", "|xns": "Roo", "items": [ { "listeners": { "|render": "function() \n{\n _this.cgrid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.cpanel.active) {\n this.footer.onClick('first');\n }\n}" }, "*prop": "grid", "autoExpandColumn": "checkitem_checkhead_id_checkhead_notes", "loadMask": true, "xtype": "Grid", "|xns": "Roo.grid", "items": [ { "listeners": { "beforeload": "function (_self, options)\n{\n options.params = options.params || {};\n options.params.checkitem_cmnumber = _this.form.findField('cmhead_number').getValue();\n}" }, "*prop": "dataSource", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'checkitem_id', direction: 'DESC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/checkitem.php'", "|xns": "Roo.data" }, { "*prop": "reader", "id": "id", "root": "data", "totalProperty": "total", "xtype": "JsonReader", "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'name',\n 'type': 'string'\n },\n {\n 'name': 'type',\n 'type': 'int'\n },\n {\n 'name': 'leader',\n 'type': 'int'\n },\n {\n 'name': 'leader_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_office_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_name',\n 'type': 'string'\n },\n {\n 'name': 'leader_phone',\n 'type': 'string'\n },\n {\n 'name': 'leader_fax',\n 'type': 'string'\n },\n {\n 'name': 'leader_email',\n 'type': 'string'\n },\n {\n 'name': 'leader_company_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_role',\n 'type': 'string'\n },\n {\n 'name': 'leader_active',\n 'type': 'int'\n },\n {\n 'name': 'leader_remarks',\n 'type': 'string'\n },\n {\n 'name': 'leader_passwd',\n 'type': 'string'\n },\n {\n 'name': 'leader_owner_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_lang',\n 'type': 'string'\n },\n {\n 'name': 'leader_no_reset_sent',\n 'type': 'int'\n },\n {\n 'name': 'leader_action_type',\n 'type': 'string'\n },\n {\n 'name': 'leader_project_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_deleted_by',\n 'type': 'int'\n },\n {\n 'name': 'leader_deleted_dt',\n 'type': 'date'\n },\n {\n 'name': 'leader_firstname',\n 'type': 'string'\n },\n {\n 'name': 'leader_lastname',\n 'type': 'string'\n },\n {\n 'name': 'leader_name_facebook',\n 'type': 'string'\n },\n {\n 'name': 'leader_url_blog',\n 'type': 'string'\n },\n {\n 'name': 'leader_url_twitter',\n 'type': 'string'\n },\n {\n 'name': 'leader_url_linkedin',\n 'type': 'string'\n },\n {\n 'name': 'leader_crm_lead_percentage',\n 'type': 'int'\n },\n {\n 'name': 'leader_crm_industry_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_crm_updated_action_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_crm_created_action_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_crm_type_id',\n 'type': 'int'\n }\n]", "|xns": "Roo.data" } ] }, { "*prop": "footer", "displayInfo": true, "displayMsg": "Displaying check item{0} - {1} of {2}", "emptyMsg": "No check item found", "pageSize": 25, "xtype": "PagingToolbar", "|xns": "Roo" }, { "*prop": "colModel[]", "dataIndex": "checkitem_docdate", "header": "Date", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ? v.format('Y-m-d') : ''); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "checkitem_bankaccnt_id_bankaccnt_name", "header": "Bank Account", "width": 100, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ? v : ''); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "checkitem_checkhead_id_checkhead_for", "header": "Memo", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ? v : ''); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "checkitem_checkhead_id_checkhead_notes", "header": "Notes", "width": 100, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ? v : ''); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "align": "right", "dataIndex": "checkitem_curr_id_curr_name", "header": "Currency", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ? v : ''); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "align": "right", "dataIndex": "checkitem_amount", "header": "Amount", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ? parseFloat(v).toFixed(2) : ''); }", "|xns": "Roo.grid" } ] } ] }, { "listeners": { "|activate": "function() {\n _this.apanel = this;\n if (_this.agrid) {\n _this.agrid.footer.onClick('first');\n }\n}" }, "background": false, "fitContainer": true, "fitToframe": true, "region": "center", "tableName": "invchead", "title": "Applications", "xtype": "GridPanel", "|xns": "Roo", "items": [ { "listeners": { "|render": "function() \n{\n _this.agrid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.apanel.active) {\n this.footer.onClick('first');\n }\n}" }, "*prop": "grid", "autoExpandColumn": "arapply_target_docnumber", "loadMask": true, "xtype": "Grid", "|xns": "Roo.grid", "items": [ { "listeners": { "beforeload": "function (_self,o) {\n\n try {\n this.removeAll();\n } catch (e) { }\n\n if (!_this.data || !_this.data.cmhead_id) {\n return false;\n }\n o.params = o.params || {};\n \n o.params._application = _this.data.cmhead_id\n \n}" }, "*prop": "dataSource", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'arapply_id', direction: 'ASC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/Arapply.php'", "|xns": "Roo.data" }, { "|xns": "Roo.data", "xtype": "JsonReader", "totalProperty": "total", "root": "data", "*prop": "reader", "id": "id", "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'name',\n 'type': 'string'\n },\n {\n 'name': 'type',\n 'type': 'int'\n },\n {\n 'name': 'leader',\n 'type': 'int'\n },\n {\n 'name': 'leader_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_office_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_name',\n 'type': 'string'\n },\n {\n 'name': 'leader_phone',\n 'type': 'string'\n },\n {\n 'name': 'leader_fax',\n 'type': 'string'\n },\n {\n 'name': 'leader_email',\n 'type': 'string'\n },\n {\n 'name': 'leader_company_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_role',\n 'type': 'string'\n },\n {\n 'name': 'leader_active',\n 'type': 'int'\n },\n {\n 'name': 'leader_remarks',\n 'type': 'string'\n },\n {\n 'name': 'leader_passwd',\n 'type': 'string'\n },\n {\n 'name': 'leader_owner_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_lang',\n 'type': 'string'\n },\n {\n 'name': 'leader_no_reset_sent',\n 'type': 'int'\n },\n {\n 'name': 'leader_action_type',\n 'type': 'string'\n },\n {\n 'name': 'leader_project_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_deleted_by',\n 'type': 'int'\n },\n {\n 'name': 'leader_deleted_dt',\n 'type': 'date'\n },\n {\n 'name': 'leader_firstname',\n 'type': 'string'\n },\n {\n 'name': 'leader_lastname',\n 'type': 'string'\n },\n {\n 'name': 'leader_name_facebook',\n 'type': 'string'\n },\n {\n 'name': 'leader_url_blog',\n 'type': 'string'\n },\n {\n 'name': 'leader_url_twitter',\n 'type': 'string'\n },\n {\n 'name': 'leader_url_linkedin',\n 'type': 'string'\n },\n {\n 'name': 'leader_crm_lead_percentage',\n 'type': 'int'\n },\n {\n 'name': 'leader_crm_industry_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_crm_updated_action_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_crm_created_action_id',\n 'type': 'int'\n },\n {\n 'name': 'leader_crm_type_id',\n 'type': 'int'\n }\n]" } ] }, { "*prop": "footer", "displayInfo": true, "displayMsg": "Displaying application{0} - {1} of {2}", "emptyMsg": "No application found", "pageSize": 25, "xtype": "PagingToolbar", "|xns": "Roo" }, { "*prop": "colModel[]", "dataIndex": "arapply_id", "header": "ID", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "arapply_distdate", "header": "Date", "width": 100, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ? v.format('Y-m-d') : ''); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "arapply_target_doctype", "header": "Target Doctype", "width": 100, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "arapply_target_docnumber", "header": "Target Docnumber", "width": 100, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "arapply_curr_id_curr_name", "header": "Currency", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", "dataIndex": "arapply_applied", "header": "Applied", "width": 75, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" } ] } ] }, { "listeners": { "|activate": "function() {\n _this.hpanel = this;\n if (_this.hgrid) {\n _this.hgrid.footer.onClick('first');\n }\n}" }, ".builderCfg": "{\"cols\":[{\"table\":\"events\",\"column\":\"event_when\",\"columnshort\":\"event_when\",\"ctype\":\"timestamp\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"events\",\"column\":\"action\",\"columnshort\":\"action\",\"ctype\":\"varchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"events\",\"column\":\"ipaddr\",\"columnshort\":\"ipaddr\",\"ctype\":\"varchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"person\",\"column\":\"person_id_name\",\"columnshort\":\"name\",\"ctype\":\"varchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"events\",\"column\":\"remarks\",\"columnshort\":\"remarks\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"}],\"cols_ex\":[\"remarks\"],\"table\":\"events\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}", "background": true, "fitContainer": true, "fitToframe": true, "region": "center", "tableName": "events", "title": "History", "xtype": "GridPanel", "|xns": "Roo", "items": [ { "listeners": { "|render": "function() \n{\n _this.hgrid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.hpanel.active) {\n this.footer.onClick('first');\n }\n}", "|rowdblclick": "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n _this.grid.footer.onClick('first');\n }); \n}\n" }, "*prop": "grid", ".builderCfg": "{\"cols\":[{\"table\":\"events\",\"column\":\"event_when\",\"columnshort\":\"event_when\",\"ctype\":\"timestamp\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"events\",\"column\":\"action\",\"columnshort\":\"action\",\"ctype\":\"varchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"events\",\"column\":\"ipaddr\",\"columnshort\":\"ipaddr\",\"ctype\":\"varchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"person\",\"column\":\"person_id_name\",\"columnshort\":\"name\",\"ctype\":\"varchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"events\",\"column\":\"remarks\",\"columnshort\":\"remarks\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"}],\"cols_ex\":[\"remarks\"],\"table\":\"events\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}", "autoExpandColumn": "remarks", "loadMask": true, "xtype": "Grid", "|xns": "Roo.grid", "items": [ { "listeners": { "beforeload": "function (_self, options)\n{\n options.params._related_on_table = 'cmhead';\n options.params._related_on_id = _this.form.findField('cmhead_id').getValue();\n \n}" }, "*prop": "dataSource", "remoteSort": true, "xtype": "Store", "|sortInfo": "{ field : 'event_when', direction: 'DESC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/events.php'", "|xns": "Roo.data" }, { "|xns": "Roo.data", "xtype": "JsonReader", "totalProperty": "total", "root": "data", ".builderCfg": "{\"cols\":[{\"table\":\"events\",\"column\":\"event_when\",\"columnshort\":\"event_when\",\"ctype\":\"timestamp\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"events\",\"column\":\"action\",\"columnshort\":\"action\",\"ctype\":\"varchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"events\",\"column\":\"ipaddr\",\"columnshort\":\"ipaddr\",\"ctype\":\"varchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"person\",\"column\":\"person_id_name\",\"columnshort\":\"name\",\"ctype\":\"varchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"},{\"table\":\"events\",\"column\":\"remarks\",\"columnshort\":\"remarks\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"}],\"cols_ex\":[\"remarks\"],\"table\":\"events\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}", "*prop": "reader", "id": "id", "|fields": "[\n {\n 'name': 'event_when',\n 'type': 'date'\n },\n {\n 'name': 'action',\n 'type': 'string'\n },\n {\n 'name': 'ipaddr',\n 'type': 'string'\n },\n {\n 'name': 'person_id_name',\n 'type': 'string'\n },\n {\n 'name': 'remarks',\n 'type': 'string'\n }\n]" } ] }, { "*prop": "footer", "xtype": "PagingToolbar", "pageSize": 25, "displayInfo": true, "displayMsg": "Displaying events{0} - {1} of {2}", "emptyMsg": "No events found", "|xns": "Roo" }, { "*prop": "colModel[]", ".builderCfg": "{\"table\":\"events\",\"column\":\"event_when\",\"columnshort\":\"event_when\",\"ctype\":\"timestamp\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}", "dataIndex": "event_when", "header": "Changed", "width": 120, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", ".builderCfg": "{\"table\":\"events\",\"column\":\"action\",\"columnshort\":\"action\",\"ctype\":\"varchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}", "dataIndex": "action", "header": "action", "width": 120, "xtype": "ColumnModel", "|renderer": "function(v,x,r) { return String.format('{0} - {1}', v, r.data.on_table); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", ".builderCfg": "{\"table\":\"events\",\"column\":\"ipaddr\",\"columnshort\":\"ipaddr\",\"ctype\":\"varchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}", "dataIndex": "ipaddr", "header": "IP address", "width": 120, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", ".builderCfg": "{\"table\":\"person\",\"column\":\"person_id_name\",\"columnshort\":\"name\",\"ctype\":\"varchar\",\"desc\":\"\",\"use\":1,\"use_ex\":\"\",\"title\":\"\"}", "dataIndex": "person_id_name", "header": "Who", "width": 120, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" }, { "*prop": "colModel[]", ".builderCfg": "{\"table\":\"events\",\"column\":\"remarks\",\"columnshort\":\"remarks\",\"ctype\":\"text\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"}", "dataIndex": "remarks", "header": "Notes", "width": 200, "xtype": "ColumnModel", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid" } ] } ] }, { "listeners": { "click": "function (_self, e)\n{\n if (_this.grid) _this.grid.stopEditing();\n _this.dialog.hide();\n}" }, "*prop": "buttons[]", "text": "Cancel", "xtype": "Button", "|xns": "Roo" }, { "listeners": { "click": "function (_self, e)\n{\n // do some checks?\n if (_this.grid) _this.grid.stopEditing();\n if (_this.form.findField('cmhead_posted').getValue() == 'true') {\n Roo.MessageBox.alert(\"Error\", \"credit memo is already posted\");\n return;\n }\n var loose = false;\n var ar = [];\n if (_this.grid && _this.grid.ds) {\n _this.grid.ds.each(function(rec) {\n if (!(rec.data.cmitem_itemsite_id * 1) || !(rec.data.cmitem_qtycredit*1) || !(rec.data.cmitem_unitprice*1)) {\n loose = true;\n return true;\n } \n ar.push(rec);\n \n });\n if (loose) {\n Roo.MessageBox.alert(\"Error\", \"Some lines do not have product/qty/price set\");\n return;\n } \n }\n if(ar.length){\n _this.form.findField('has_item').setValue(ar.length);\n } \n \n _this.form.doAction(\"submit\");\n}", "render": "function (_self)\n{\n_this.saveBtn = _self;\n}" }, "*prop": "buttons[]", "text": "Save", "xtype": "Button", "|xns": "Roo" } ] } ], "permname": "", "modOrder": "001" }