1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-23 22:03:18 +01:00

Correzioni minori

This commit is contained in:
Thomas Zilio 2020-07-31 14:57:23 +02:00
parent f47c1ed25f
commit 7ee5b72cb3
6 changed files with 66 additions and 15 deletions

View File

@ -20,8 +20,8 @@ if ($dir == 'entrata') {
echo '
<div class="btn-group">
<button type="button" class="btn btn-primary unblockable dropdown-toggle '.(((!empty($record['ref_documento']) || $record['stato'] != 'Bozza') and empty($record['is_reversed'])) ? '' : 'disabled').'" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-magic"></i> '.tr('Crea').' <span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
<i class="fa fa-magic"></i> '.tr('Crea').'
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">

View File

@ -36,3 +36,19 @@ function anteprimaFirma() {
openModal("'.tr('Anteprima e firma').'", "'.$module->fileurl('add_firma.php').'?id_module='.$id_module.'&id_record='.$id_record.'&anteprima=1");
}
</script>';
// Creazione altri documenti
echo '
<div class="btn-group">
<button class="btn btn-info dropdown-toggle '.(!$record['flag_completato'] ? 'disabled' : '').'" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<i class="fa fa-magic"></i> '.tr('Crea').'
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=fattura" data-toggle="modal" data-title="'.tr('Crea fattura').'">
<i class="fa fa-file"></i> '.tr('Fattura').'
</a>
</li>
</ul>
</div>';

View File

@ -0,0 +1,35 @@
<?php
include_once __DIR__.'/../../core.php';
use Modules\Interventi\Intervento;
$documento = Intervento::find($id_record);
$module = Modules::get($documento->module);
if (get('documento') == 'fattura') {
$final_module = 'Fatture di vendita';
$op = 'add_documento';
} elseif (get('documento') == 'ordine_fornitore') {
$final_module = 'Ordini fornitore';
$op = 'add_ordine_cliente';
} elseif (get('documento') == 'ordine') {
$final_module = 'Ordini cliente';
$op = 'add_documento';
} else {
$final_module = 'Ddt di vendita';
$op = 'add_documento';
}
$options = [
'op' => $op,
'type' => 'ordine',
'module' => $final_module,
'button' => tr('Aggiungi'),
'create_document' => true,
'serials' => true,
'documento' => $documento,
];
echo App::load('importa.php', [], $options, true);

View File

@ -3,33 +3,33 @@
include_once __DIR__.'/../../core.php';
echo '
<div class="dropdown">
<div class="btn-group">
<button class="btn btn-info dropdown-toggle '.(!in_array($record['stato'], ['Fatturato', 'Evaso', 'Bozza']) ? '' : 'disabled').'" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<i class="fa fa-magic"></i>&nbsp;'.tr('Crea').'...
<i class="fa fa-magic"></i> '.tr('Crea').'
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=intervento" data-toggle="modal" data-title="'.tr('Crea attività').'">
<i class="fa fa-wrench"></i>&nbsp;'.tr('Attività').'
<i class="fa fa-wrench"></i> '.tr('Attività').'
</a>
</li>
<li>
<a data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ordine_fornitore" data-toggle="modal" data-title="'.tr('Crea ordine fornitore').'">
<i class="fa fa-file-o"></i>&nbsp;'.tr('Ordine fornitore').'
<i class="fa fa-file-o"></i> '.tr('Ordine fornitore').'
</a>
</li>
<li>
<a data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ddt" data-toggle="modal" data-title="'.tr('Crea ddt').'">
<i class="fa fa-truck"></i>&nbsp;'.tr('Ddt').'
<i class="fa fa-truck"></i> '.tr('Ddt').'
</a>
</li>
<li>
<a data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=fattura" data-toggle="modal" data-title="'.tr('Crea fattura').'">
<i class="fa fa-file"></i>&nbsp;'.tr('Fattura').'
<i class="fa fa-file"></i> '.tr('Fattura').'
</a>
</li>
</ul>

View File

@ -85,5 +85,5 @@ function open_movimento(id_mastrino, id_module){
</script>';
} else {
echo '
<span>&nbsp;'.tr('Nessun movimento presente').'</span>';
<span>'.tr('Nessun movimento presente').'</span>';
}

View File

@ -23,35 +23,35 @@ $stati_abilitati = $dbo->fetchOne('SELECT GROUP_CONCAT(`descrizione` SEPARATOR "
// Creazione altri documenti
echo '
<div style="margin-left:4px;" class="dropdown pull-right">
<div class="btn-group">
<button class="btn btn-info dropdown-toggle '.($disabled ? '' : 'disabled tip').'" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" '.($disabled ? '' : 'disabled').' title="'.($disabled ? '' : tr('Per creare un documento deve essere inserita almeno una riga e lo stato del preventivo deve essere tra: _STATE_LIST_', [
'_STATE_LIST_' => $stati_abilitati,
])).'" >
<i class="fa fa-magic"></i>&nbsp;'.tr('Crea').'...
<i class="fa fa-magic"></i> '.tr('Crea').'
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a class="'.($disabled ? '' : 'disabled').'" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=contratto" data-toggle="modal" data-title="'.tr('Crea contratto').'">
<i class="fa fa-file-o"></i>&nbsp;'.tr('Contratto').'
<i class="fa fa-file-o"></i> '.tr('Contratto').'
</a>
</li>
<li>
<a class="'.($disabled ? '' : 'disabled').'" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ordine" data-toggle="modal" data-title="'.tr('Crea ordine cliente').'">
<i class="fa fa-file-o"></i>&nbsp;'.tr('Ordine cliente').'
<i class="fa fa-file-o"></i> '.tr('Ordine cliente').'
</a>
</li>
<li>
<a class="'.($disabled ? '' : 'disabled').'" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=ddt" data-toggle="modal" data-title="'.tr('Crea ordine cliente').'">
<i class="fa fa-truck"></i>&nbsp;'.tr('DDT in uscita').'
<i class="fa fa-truck"></i> '.tr('DDT in uscita').'
</a>
</li>
<li>
<a class="'.($disabled ? '' : 'disabled').'" data-href="'.$structure->fileurl('crea_documento.php').'?id_module='.$id_module.'&id_record='.$id_record.'&documento=fattura" data-toggle="modal" data-title="'.tr('Crea fattura').'">
<i class="fa fa-file"></i>&nbsp;'.tr('Fattura').'
<i class="fa fa-file"></i> '.tr('Fattura').'
</a>
</li>
</ul>