bugfix on delete command

This commit is contained in:
Markus 2022-10-05 09:31:41 +02:00
parent 8d16903e40
commit 5e7cfdd8e4
2 changed files with 2 additions and 2 deletions

View File

@ -198,8 +198,8 @@ class mBills extends Model {
function deleteEntry($id){ function deleteEntry($id){
$details = model('App\Models\mBillDetails'); $details = model('App\Models\mBillDetails');
if ($id > 0){ if ($id > 0){
$this->delete($id);
$details->where('bill_id',$id)->delete(); $details->where('bill_id',$id)->delete();
$this->delete($id);
} }
} }
}; };

View File

@ -54,7 +54,7 @@ function deleteId(id, table) {
cmnd = "deleteBill"; cmnd = "deleteBill";
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/Ajax/"+cmnd+"/"+id, url: "/Ajax/"+cmnd,
data: {"id" : id}, // serializes the form's elements. data: {"id" : id}, // serializes the form's elements.
success: function(data){ success: function(data){
var ph = document.getElementById('alertbox'); var ph = document.getElementById('alertbox');