trabajando en pagos (datepicker)

This commit is contained in:
2024-07-16 22:11:21 +02:00
parent ce7ba82bda
commit 67fbc2589f
24 changed files with 1225 additions and 228 deletions

View File

@ -38,6 +38,18 @@ class FormaPagoModel extends \App\Models\BaseModel
],
];
public function getMenuItems(){
$items = $this->findAll();
$menuItems = [];
foreach ($items as $item) {
$menuItems[] = [
"value" => $item->id,
"label" => $item->nombre,
];
}
return $menuItems;
}
/**
* Get resource data.
*

View File

@ -108,4 +108,19 @@ class SeriesFacturasModel extends \App\Models\BaseModel
return $result;
}
public function getSerieNumerada($id)
{
$number = $this->db->table($this->table)
->select("next, formato")
->where("id", $id)
->get()->getFirstRow();
$this->db->table($this->table)
->where("id", $id)
->set("next", $number->next + 1, false)
->update();
return str_replace("{number}", $number->next, $number->formato);
}
}