mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-01 08:26:53 +01:00
fix: selezione modulo per eng
This commit is contained in:
parent
a929092109
commit
1893e4e3f4
@ -57,7 +57,7 @@ echo '
|
||||
<input type="hidden" name="blocca_minimo_vendita" value="'.setting('Bloccare i prezzi inferiori al minimo di vendita').'">';
|
||||
|
||||
// Selezione impianto per gli Interventi
|
||||
if ($module->getTranslation('title') == 'Attività') {
|
||||
if ($module->name == 'Interventi') {
|
||||
echo '
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
@ -33,7 +33,7 @@ echo '
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if ($module->getTranslation('title') == 'Preventivi' && $options['op'] == 'manage_descrizione') {
|
||||
if ($module->name == 'Preventivi' && $options['op'] == 'manage_descrizione') {
|
||||
echo '
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
@ -244,9 +244,9 @@ if ($options['dir'] == 'entrata') {
|
||||
|
||||
if (in_array($module->getTranslation('title'), ['Ordini cliente', 'Ordini fornitore', 'Preventivi'])) {
|
||||
if ($options['action'] == 'add') {
|
||||
if ($module->getTranslation('title') == 'Ordini cliente') {
|
||||
if ($module->name == 'Ordini cliente') {
|
||||
$confermato = setting('Conferma automaticamente le quantità negli ordini cliente');
|
||||
} elseif ($module->getTranslation('title') == 'Ordini fornitore') {
|
||||
} elseif ($module->name == 'Ordini fornitore') {
|
||||
$confermato = setting('Conferma automaticamente le quantità negli ordini fornitore');
|
||||
} else {
|
||||
$confermato = setting('Conferma automaticamente le quantità nei preventivi');
|
||||
@ -280,7 +280,7 @@ if (in_array($module->getTranslation('title'), ['Ordini cliente', 'Ordini fornit
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{[ "type": "checkbox", "label": "'.tr('Articolo confermato').'", "name": "confermato", "value": "'.$confermato.'", "help": "'.tr('Articolo confermato dal _ANA_ e che è possibile evadere', ['_ANA_' => $module->getTranslation('title') == 'Ordini fornitore' ? tr('fornitore') : tr('cliente')]).'" ]}
|
||||
{[ "type": "checkbox", "label": "'.tr('Articolo confermato').'", "name": "confermato", "value": "'.$confermato.'", "help": "'.tr('Articolo confermato dal _ANA_ e che è possibile evadere', ['_ANA_' => $module->name == 'Ordini fornitore' ? tr('fornitore') : tr('cliente')]).'" ]}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{[ "type": "checkbox", "label": "'.tr('Cambia stato a tutte le righe').'", "name": "confermato_all", "value": "" ]}
|
||||
|
2
mail.php
2
mail.php
@ -156,7 +156,7 @@ echo '
|
||||
</div>';
|
||||
|
||||
$uploads = [];
|
||||
if ($smtp['pec'] == 1 && $module->getTranslation('title') == 'Fatture di vendita') {
|
||||
if ($smtp['pec'] == 1 && $module->name == 'Fatture di vendita') {
|
||||
$uploads = $dbo->fetchArray('SELECT id FROM zz_files WHERE id_module = '.prepare($module['id']).' AND id_record = '.prepare($id_record).' AND category = \'Fattura Elettronica\'');
|
||||
$uploads = array_column($uploads, 'id');
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ use Modules\Iva\Aliquota;
|
||||
|
||||
$module = Module::find($id_module);
|
||||
|
||||
if ($module->getTranslation('title') == 'Ddt in uscita') {
|
||||
if ($module->name == 'Ddt in uscita') {
|
||||
$dir = 'entrata';
|
||||
} else {
|
||||
$dir = 'uscita';
|
||||
|
@ -27,7 +27,7 @@ use Modules\Fatture\Fattura;
|
||||
use Modules\Fatture\Stato;
|
||||
use Modules\Fatture\Tipo;
|
||||
|
||||
if ($module->getTranslation('title') == 'Ddt in uscita') {
|
||||
if ($module->name == 'Ddt in uscita') {
|
||||
$dir = 'entrata';
|
||||
$module_fatture = 'Fatture di vendita';
|
||||
} else {
|
||||
|
@ -29,7 +29,7 @@ $tipo_documento_finale = Fattura::class;
|
||||
|
||||
$module = Module::find($id_module);
|
||||
|
||||
if ($module->getTranslation('title') == 'Ddt in uscita') {
|
||||
if ($module->name == 'Ddt in uscita') {
|
||||
$final_module = 'Fatture di vendita';
|
||||
$dir = 'entrata';
|
||||
} else {
|
||||
|
@ -63,7 +63,7 @@ $idtipodocumento = Tipo::where('predefined', 1)->where('dir', $dir)->first()->id
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{[ "type": "select", "label": "<?php echo $tipo_anagrafica; ?>", "name": "idanagrafica", "id": "idanagrafica_add", "required": 1, "ajax-source": "<?php echo $module->getTranslation('title') == 'Fatture di vendita' ? 'clienti' : 'fornitori'; ?>", "value": "<?php echo $id_anagrafica; ?>", "icon-after": "add|<?php echo Module::where('name', 'Anagrafiche')->first()->id; ?>|tipoanagrafica=<?php echo $tipo_anagrafica; ?>" ]}
|
||||
{[ "type": "select", "label": "<?php echo $tipo_anagrafica; ?>", "name": "idanagrafica", "id": "idanagrafica_add", "required": 1, "ajax-source": "<?php echo $module->name == 'Fatture di vendita' ? 'clienti' : 'fornitori'; ?>", "value": "<?php echo $id_anagrafica; ?>", "icon-after": "add|<?php echo Module::where('name', 'Anagrafiche')->first()->id; ?>|tipoanagrafica=<?php echo $tipo_anagrafica; ?>" ]}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -26,7 +26,7 @@ use Modules\Fatture\Fattura;
|
||||
$module = Module::find($id_module);
|
||||
$module_interventi = Module::where('name', 'Interventi')->first();
|
||||
|
||||
if ($module->getTranslation('title') == 'Fatture di vendita') {
|
||||
if ($module->name == 'Fatture di vendita') {
|
||||
$dir = 'entrata';
|
||||
$conti = 'conti-vendite';
|
||||
} else {
|
||||
|
@ -75,9 +75,9 @@ if (in_array($module->getTranslation('title'), ['Fatture di vendita', 'Fatture d
|
||||
$is_rientrabile = $database->fetchOne('SELECT * FROM `dt_causalet` WHERE `id` = '.prepare($ddt->idcausalet))['is_rientrabile'];
|
||||
} elseif (in_array($module->getTranslation('title'), ['Ordini cliente', 'Ordini fornitore'])) {
|
||||
$modulo = 'ord';
|
||||
} elseif ($module->getTranslation('title') == 'Attività') {
|
||||
} elseif ($module->name == 'Interventi') {
|
||||
$modulo = 'int';
|
||||
} elseif ($module->getTranslation('title') == 'Contratti') {
|
||||
} elseif ($module->name == 'Contratti') {
|
||||
$modulo = 'con';
|
||||
} else {
|
||||
$modulo = 'veb';
|
||||
|
@ -89,7 +89,7 @@ switch (post('op')) {
|
||||
|
||||
$module = Module::find($id_module);
|
||||
|
||||
if ($module->getTranslation('title') == 'Fatture di vendita') {
|
||||
if ($module->name == 'Fatture di vendita') {
|
||||
$print_name = 'Fattura elettronica di vendita';
|
||||
} else {
|
||||
$print_name = 'Fattura elettronica di acquisto';
|
||||
@ -656,7 +656,7 @@ if (Interaction::isEnabled()) {
|
||||
];
|
||||
}
|
||||
|
||||
if ($module->getTranslation('title') == 'Fatture di vendita') {
|
||||
if ($module->name == 'Fatture di vendita') {
|
||||
$operations['check-bulk'] = [
|
||||
'text' => '<span><i class="fa fa-list-alt"></i> '.tr('Controlla fatture elettroniche').'</span>',
|
||||
'data' => [
|
||||
@ -704,7 +704,7 @@ $operations['export-csv'] = [
|
||||
],
|
||||
];
|
||||
|
||||
if ($module->getTranslation('title') == 'Fatture di vendita') {
|
||||
if ($module->name == 'Fatture di vendita') {
|
||||
$operations['export-bulk'] = [
|
||||
'text' => '<span class="'.((!extension_loaded('zip')) ? 'text-muted disabled' : '').'"><i class="fa fa-file-archive-o"></i> '.tr('Esporta stampe').'</span>',
|
||||
'data' => [
|
||||
@ -749,7 +749,7 @@ $operations['export-xml-bulk'] = [
|
||||
],
|
||||
];
|
||||
|
||||
if ($module->getTranslation('title') == 'Fatture di vendita') {
|
||||
if ($module->name == 'Fatture di vendita') {
|
||||
$operations['genera-xml'] = [
|
||||
'text' => '<span><i class="fa fa-file-code-o"></i> '.tr('Genera fatture elettroniche').'</span>',
|
||||
'data' => [
|
||||
|
@ -21,7 +21,7 @@
|
||||
include_once __DIR__.'/../../core.php';
|
||||
use Models\Module;
|
||||
|
||||
if ($module->getTranslation('title') == 'Fatture di vendita') {
|
||||
if ($module->name == 'Fatture di vendita') {
|
||||
$attributi_visibili = $record['dati_aggiuntivi_fe'] != null || $record['stato'] == 'Bozza';
|
||||
|
||||
echo '
|
||||
|
@ -28,7 +28,7 @@ use Util\XML;
|
||||
|
||||
$services_enable = Interaction::isEnabled();
|
||||
|
||||
if ($module->getTranslation('title') == 'Fatture di vendita' && $services_enable) {
|
||||
if ($module->name == 'Fatture di vendita' && $services_enable) {
|
||||
$documenti_scarto = [];
|
||||
$documenti_invio = [];
|
||||
$codici_scarto = ['EC02', 'ERR', 'ERVAL', 'NS'];
|
||||
|
@ -23,7 +23,7 @@ use Modules\Fatture\StatoFE;
|
||||
|
||||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
if ($module->getTranslation('title') == 'Fatture di vendita') {
|
||||
if ($module->name == 'Fatture di vendita') {
|
||||
$dir = 'entrata';
|
||||
} else {
|
||||
$dir = 'uscita';
|
||||
|
@ -36,7 +36,7 @@ use Plugins\ListinoClienti\DettaglioPrezzo;
|
||||
|
||||
$module = Module::find($id_module);
|
||||
|
||||
if ($module->getTranslation('title') == 'Ordini cliente') {
|
||||
if ($module->name == 'Ordini cliente') {
|
||||
$dir = 'entrata';
|
||||
} else {
|
||||
$dir = 'uscita';
|
||||
|
@ -209,7 +209,7 @@ switch (post('op')) {
|
||||
|
||||
break;
|
||||
}
|
||||
if ($module->getTranslation('title') == 'Ordini cliente') {
|
||||
if ($module->name == 'Ordini cliente') {
|
||||
// Fix per modulo Fatture di vendita disabilitato
|
||||
$module_fatture = $id_modulo_fatture ? Module::find($id_modulo_fatture)->getTranslation('title') : '';
|
||||
$module_fatture ? strtolower((string) $module_fatture) : '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user