mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-10 00:20:51 +01:00
Formattazione codice
This commit is contained in:
parent
cccd2b3c39
commit
1cc40b76e2
@ -34,7 +34,6 @@ class CausaleMovimento extends Model
|
|||||||
'title',
|
'title',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
public function getModuleAttribute()
|
public function getModuleAttribute()
|
||||||
{
|
{
|
||||||
return 'Causali movimenti';
|
return 'Causali movimenti';
|
||||||
|
@ -22,7 +22,7 @@ use Modules\Newsletter\Newsletter;
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
if (!empty(($id_record))) {
|
if (!empty($id_record)) {
|
||||||
$newsletter = Newsletter::find($id_record);
|
$newsletter = Newsletter::find($id_record);
|
||||||
|
|
||||||
$record = $newsletter->toArray();
|
$record = $newsletter->toArray();
|
||||||
|
@ -75,7 +75,7 @@ switch (filter('op')) {
|
|||||||
if (isset($nome)) {
|
if (isset($nome)) {
|
||||||
// Se non esiste già un tipo di scadenza con lo stesso nome
|
// Se non esiste già un tipo di scadenza con lo stesso nome
|
||||||
if (empty(Tipo::where('id', '=', (new Tipo())->getByField('title', $descrizione))->where('id', '!=', $id_record)->first())) {
|
if (empty(Tipo::where('id', '=', (new Tipo())->getByField('title', $descrizione))->where('id', '!=', $id_record)->first())) {
|
||||||
$tipo = tipo::build();
|
$tipo = Tipo::build();
|
||||||
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
if (Models\Locale::getDefault()->id == Models\Locale::getPredefined()->id) {
|
||||||
$tipo->name = $nome;
|
$tipo->name = $nome;
|
||||||
}
|
}
|
||||||
|
@ -386,7 +386,6 @@ class Database extends Util\Singleton
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restituisce l'identificativo dell'ultimo elemento inserito.
|
* Restituisce l'identificativo dell'ultimo elemento inserito.
|
||||||
*
|
*
|
||||||
|
@ -95,7 +95,7 @@ foreach ($righe as $riga) {
|
|||||||
if (in_array($riga->id, $riferimento)) {
|
if (in_array($riga->id, $riferimento)) {
|
||||||
if ($riga->id === $riferimento[0]) {
|
if ($riga->id === $riferimento[0]) {
|
||||||
$riga_ordine = $database->fetchOne('SELECT numero_cliente, data_cliente FROM or_ordini WHERE id = '.prepare($riga->idordine));
|
$riga_ordine = $database->fetchOne('SELECT numero_cliente, data_cliente FROM or_ordini WHERE id = '.prepare($riga->idordine));
|
||||||
if (!(setting('Visualizza numero ordine cliente'))) {
|
if (!setting('Visualizza numero ordine cliente')) {
|
||||||
if (!empty($riga_ordine['numero_cliente']) && !empty($riga_ordine['data_cliente'])) {
|
if (!empty($riga_ordine['numero_cliente']) && !empty($riga_ordine['data_cliente'])) {
|
||||||
$text = $text.'<b>Ordine n. '.$riga_ordine['numero_cliente'].' del '.Translator::dateToLocale($riga_ordine['data_cliente']).'</b><br>';
|
$text = $text.'<b>Ordine n. '.$riga_ordine['numero_cliente'].' del '.Translator::dateToLocale($riga_ordine['data_cliente']).'</b><br>';
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,6 @@ if (database()->columnExists('dt_statiddt_lang', 'name')) {
|
|||||||
$database->query('ALTER TABLE `dt_statiddt_lang` DROP `name`');
|
$database->query('ALTER TABLE `dt_statiddt_lang` DROP `name`');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Controllo se è presente il campo name in dt_tipiddt
|
// Controllo se è presente il campo name in dt_tipiddt
|
||||||
$has_name = database()->columnExists('dt_tipiddt', 'name');
|
$has_name = database()->columnExists('dt_tipiddt', 'name');
|
||||||
if (!$has_name) {
|
if (!$has_name) {
|
||||||
@ -223,7 +222,6 @@ if (database()->columnExists('em_lists_lang', 'name')) {
|
|||||||
$database->query('ALTER TABLE `em_lists_lang` DROP `name`');
|
$database->query('ALTER TABLE `em_lists_lang` DROP `name`');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Controllo se è presente il campo name in em_templates
|
// Controllo se è presente il campo name in em_templates
|
||||||
$has_name = database()->columnExists('em_templates', 'name');
|
$has_name = database()->columnExists('em_templates', 'name');
|
||||||
if (!$has_name) {
|
if (!$has_name) {
|
||||||
@ -329,7 +327,6 @@ if (database()->columnExists('mg_categorie_lang', 'name')) {
|
|||||||
$database->query('ALTER TABLE `mg_categorie_lang` DROP `name`');
|
$database->query('ALTER TABLE `mg_categorie_lang` DROP `name`');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Rimozione categoria 'Componenti' se non collegata ad articoli
|
// Rimozione categoria 'Componenti' se non collegata ad articoli
|
||||||
$categoria = Categoria::find((new Categoria())->getByField('title', 'Componenti'));
|
$categoria = Categoria::find((new Categoria())->getByField('title', 'Componenti'));
|
||||||
$articoli_collegati = $categoria->articoli()->count();
|
$articoli_collegati = $categoria->articoli()->count();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user