},
{
"listeners": {
- "|click": "function ()\n{\n\n var sel = _this.invgrid.getSelectionModel().getSelected();\n if (!sel) {\n Roo.MessageBox.alert(\"Error\", \"Select a invoice\");\n return;\n }\n // check current status of shipment..\n \n var params = {\n// cobmisc_id : sel.data.cobmisc_id,\n _void : 1\n };\n if (sel.data.cobmisc_id * 1) {\n params.cobmisc_id = sel.data.cobmisc_id * 1 ;\n }\n if (sel.data.cobmisc_invchead_id_invchead_id * 1) { \n params.invchead_id = sel.data.cobmisc_invchead_id_invchead_id * 1;\n }\n \n Roo.MessageBox.confirm(\"Are you sure\", \"Are you sure you want to VOID that invoice?\",\n function(r) {\n if (r != 'yes') {\n return;\n }\n new Pman.Request({\n mask : 'Sending',\n url : baseURL + '/Roo/cobmisc',\n method : 'POST',\n params : params,\n success : function() {\n _this.invgrid.ds.load({});\n }\n })\n \n }\n );\n \n \n \n}"
+ "|click": "function ()\n{\n \n Roo.MessageBox.confirm(\"Are you sure\", \"Are you sure you want to VOID all the Sales Order and Purchase Order?\",\n function(r) {\n if (r != 'yes') {\n return;\n }\n new Pman.Request({\n mask : 'Voiding',\n url : baseURL + '/Xtuple/VoidSalesAndPurchaseOrders',\n method : 'GET',\n success : function() {\n Roo.log('done'); \n }\n })\n \n }\n );\n \n \n \n}"
},
"cls": "x-btn-text-icon",
"text": "Void all the Sales Order and Purchase Order",
listeners : {
click : function ()
{
-
- var sel = _this.invgrid.getSelectionModel().getSelected();
- if (!sel) {
- Roo.MessageBox.alert("Error", "Select a invoice");
- return;
- }
- // check current status of shipment..
-
- var params = {
- // cobmisc_id : sel.data.cobmisc_id,
- _void : 1
- };
- if (sel.data.cobmisc_id * 1) {
- params.cobmisc_id = sel.data.cobmisc_id * 1 ;
- }
- if (sel.data.cobmisc_invchead_id_invchead_id * 1) {
- params.invchead_id = sel.data.cobmisc_invchead_id_invchead_id * 1;
- }
- Roo.MessageBox.confirm("Are you sure", "Are you sure you want to VOID that invoice?",
+ Roo.MessageBox.confirm("Are you sure", "Are you sure you want to VOID all the Sales Order and Purchase Order?",
function(r) {
if (r != 'yes') {
return;
}
new Pman.Request({
- mask : 'Sending',
- url : baseURL + '/Roo/cobmisc',
- method : 'POST',
- params : params,
+ mask : 'Voiding',
+ url : baseURL + '/Xtuple/VoidSalesAndPurchaseOrders',
+ method : 'GET',
success : function() {
- _this.invgrid.ds.load({});
+ Roo.log('done');
}
})