Compare commits

...

4 Commits

Author SHA1 Message Date
valentina fef17498d3 Fix minore 2024-07-12 15:39:21 +02:00
valentina f9c90a0541 Fix avviso fatturazione attività 2024-07-12 10:40:27 +02:00
valentina 9fb3e7aaff Fix creazione preventivo da bulk in Articoli 2024-07-12 10:32:52 +02:00
FabioL 1af56dc811 Fix salvataggio e visualizzazione note checklist 2024-07-12 09:04:54 +02:00
4 changed files with 15 additions and 8 deletions

View File

@ -221,7 +221,6 @@ switch (post('op')) {
$articolo = ArticoloPreventivo::build($preventivo, $originale);
$id_iva = $originale->idiva_vendita ?: setting('Iva predefinita');
$articolo->qta = 1;
$articolo->setTranslation('title', $originale->getTranslation('title'));
$articolo->um = $originale->um ?: null;
$articolo->costo_unitario = $originale->prezzo_acquisto;
$articolo->prezzo_unitario = $originale->prezzo_vendita;

View File

@ -60,7 +60,14 @@ if (!function_exists('renderChecklist')) {
$result .= '
<td style="width:500px;border-top:0px;">
{[ "type": "textarea", "class": "unblockable", "name": "note_checklist", "placeholder": "'.tr('Note').'...", "id": "note_'.$check->id.'", "value": "'.$check->note.'" ]}
'.input([
'type' => 'textarea',
'name' => '',
'id' => 'note_'.$check->id,
'class' => 'unblockable',
'placeholder' => tr('Note').'...',
'value' => $check->note,
]).'
</td>';
$result .= '

View File

@ -429,8 +429,9 @@ $operations['export-bulk'] = [
$operations['crea_fattura'] = [
'text' => '<span><i class="fa fa-file-code-o"></i> '.tr('Fattura _TYPE_', ['_TYPE_' => strtolower((string) $module->getTranslation('title'))]),
'data' => [
'title' => tr('Fatturare gli _TYPE_ selezionati?', ['_TYPE_' => strtolower((string) $module->getTranslation('title'))]).' <small><i class="fa fa-question-circle-o tip" title="'.tr('Verranno fatturati solo gli interventi completati non collegati a contratti o preventivi').'."></i></small>',
'msg' => '{[ "type": "checkbox", "label": "<small>'.tr('Aggiungere alle fatture di vendita non ancora emesse?').'</small>", "placeholder": "'.tr('Aggiungere alle fatture di vendita nello stato bozza?').'", "name": "accodare" ]}<br>
'title' => tr('Fatturare le attività selezionate?'),
'msg' => '<small>Verranno fatturate solo le attività completate, <br>non collegate a contratti o preventivi.</small><br>
<br>{[ "type": "checkbox", "label": "<small>'.tr('Aggiungere alle fatture di vendita non ancora emesse?').'</small>", "placeholder": "'.tr('Aggiungere alle fatture di vendita nello stato bozza?').'", "name": "accodare" ]}<br>
{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "ajax-source": "segmenti", "select-options": '.json_encode(['id_module' => $id_fatture, 'is_sezionale' => 1]).', "value": "'.$id_segment.'", "select-options-escape": true ]}<br>
{[ "type": "select", "label": "'.tr('Tipo documento').'", "name": "idtipodocumento", "required": 1, "values": "query=SELECT `co_tipidocumento`.`id`, CONCAT(`codice_tipo_documento_fe`, \' - \', `title`) AS descrizione FROM `co_tipidocumento` LEFT JOIN `co_tipidocumento_lang` ON (`co_tipidocumento`.`id` = `co_tipidocumento_lang`.`id_record` AND `co_tipidocumento_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `enabled` = 1 AND `dir` =\'entrata\' ORDER BY `codice_tipo_documento_fe`", "value": "'.$idtipodocumento.'" ]}<br>
{[ "type": "select", "label": "'.tr('Raggruppa per').'", "name": "raggruppamento", "required": 1, "values": "list=\"cliente\":\"Cliente\",\"sede\":\"Sede\"" ]}',

View File

@ -330,18 +330,18 @@ foreach ($righe as $key => $riga) {
if (!$options['no-iva']) {
echo '
<tr>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right">
<td colspan="'.($options['show-only-total'] ? 2 : 5).'" class="text-right">
<b>'.tr('Iva', [], ['upper' => true]).':</b>
</td>
<td colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
<td colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 1)).'" class="text-right">
'.moneyFormat($iva_gruppo, $d_totali).'
</td>
</tr>
<tr>
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right">
<td colspan="'.($options['show-only-total'] ? 2 : 5).'" class="text-right">
<b>'.tr('Subtotale ivato', [], ['upper' => true]).':</b>
</td>
<td colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
<td colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 1)).'" class="text-right">
<b>'.moneyFormat($subtotale_gruppo + $iva_gruppo, $d_totali).'</b>
</td>
</tr>';