replace old syntax, rename pdf models with same class name (#30271)

* replace old syntax

* replace old syntax

* replace old syntax

* replace old syntax

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* fix class with same name

* fix class with same name

* clean code
This commit is contained in:
Frédéric FRANCE
2024-07-06 02:59:40 +02:00
committed by GitHub
parent 6e58d54475
commit ea416aac93
39 changed files with 120 additions and 95 deletions

View File

@@ -1,8 +1,9 @@
<?php
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2023 Alexandre Spangaro <aspangaro@easya.solutions>
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2023 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -261,8 +262,8 @@ class modExpenseReport extends DolibarrModules
$this->remove($options);
$sql = array(
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'standard' AND type='expensereport' AND entity = ".((int) $conf->entity),
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('standard','expensereport',".((int) $conf->entity).")"
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'standard_expensereport' AND type='expensereport' AND entity = ".((int) $conf->entity),
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('standard_expensereport','expensereport',".((int) $conf->entity).")"
);
return $this->_init($sql, $options);