Added InvoiceJob

This commit is contained in:
Frank Schubert
2024-08-29 14:51:37 +02:00
parent 248013423d
commit 1ed2dddb97
13 changed files with 1051 additions and 30 deletions

View File

@@ -32,7 +32,7 @@ class mfBaseModel {
* Takes ID or DB row as arguments
* @param id or table row $_
*/
public function __construct($_ = NULL) {
public function __construct($_ = NULL, $new_db_connection = false) {
$this->log = mfLoghandler::singleton();
$this->table = get_class($this);
$this->data = new stdClass();
@@ -46,6 +46,9 @@ class mfBaseModel {
if(FRONKDB) {
$this->db = FronkDB::singleton();
if($new_db_connection) {
$this->db->reconnect();
}
}
if(method_exists($this, "init")) {
@@ -59,6 +62,10 @@ class mfBaseModel {
}
}
public function reconnectDB() {
$this->db->reconnect();
}
public function load($row) {
if(!is_object($this->data)) {
$this->data = new stdClass();