delete button for suspended sales direct from menu
hoststatic opened this issue · comments
I am loading suspended sale on new page, and struggling to delete suspended sales from a url instead of going to unsuspend and then delete there.
Unsuspend url is like localhost/ospos/public/sales/unsuspend with payload
csrf_ospos_v3=cecxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&suspended_sale_id=57242&submit=Unsuspend.
Is there any short around more like calling an url delete/....sale_id=57242
It can be done with a url redirect and then loading the url /cancel but is there a simpler way
thanks
What version are you using.
sorry have been away for some days. I have version 3.3.6
I got suspeded sales in a custom page (not the form) and would like to build something like delete button for each suspended sale, suspended sales are in rows and would like to have for each row a button for deleting @odiea
add the following to controller/sales
public function remove_suspended_sale()
{
$suspended_id = $this->input->post('suspended_sale_id');
$this->sale_lib->clear_all();
$this->Sale->delete_suspended_sale($suspended_id);
$this->_reload();
}
Then in views/sales/suspended add the following button underneath the comment button.
<td>
<?php echo form_open('sales/remove_suspended_sale') ?>
<?php echo form_hidden('suspended_sale_id', $suspended_sale['sale_id']) ?>
<input type="submit" name="submit" value="<?php echo $this->lang->line('common_cancel') ?>" id="submit" class="btn btn-danger btn-xs pull-right">
<?php echo form_close() ?>
</td>
thanks a bunch @odiea, will test tomorrow and let you know dear
dear @odiea would you consider providing a button function for completing sale directly. Thanks
That is beyond my ability.