diff --git a/editor.php b/editor.php index 2f583309f..6ed42ab11 100755 --- a/editor.php +++ b/editor.php @@ -339,6 +339,12 @@ if (empty($record) || !$has_access) { $icon = 'times'; $color = 'danger'; break; + + case 'copy': + $description = tr('Duplicato'); + $icon = 'clone'; + $color = 'info'; + break; default: $timeline_class = ' class="timeline-inverted"'; diff --git a/modules/fatture/edit.php b/modules/fatture/edit.php index 06b14efcf..dda7e1321 100644 --- a/modules/fatture/edit.php +++ b/modules/fatture/edit.php @@ -118,16 +118,18 @@ if ($dir == 'entrata' && !empty($fattura->dichiarazione) && $fattura->stato->des {[ "type": "text", "label": "'.tr('Numero fattura/protocollo').'", "required": 1, "name": "numero","class": "text-center alphanumeric-mask", "value": "$numero$" ]} '; $label = tr('Numero fattura del fornitore'); + $size = 2; } else { $label = tr('Numero fattura'); + $size = 4; } ?> {[ "type": "hidden", "label": "Segmento", "name": "id_segment", "class": "text-center", "value": "$id_segment$" ]} -
- {[ "type": "text", "label": "", "name": "numero_esterno", "class": "text-center", "value": "$numero_esterno$", "help": "" ]} +
+ {[ "type": "text", "label": "", "name": "numero_esterno", "class": "text-center", "value": "$numero_esterno$", "help": "" ]}
@@ -150,13 +152,11 @@ if (empty($record['is_fiscale'])) { } ?> -
-
> - {[ "type": "date", "label": "", "name": "data_registrazione", "required": 0, "value": "$data_registrazione$", "help": "" ]} -
+
> + {[ "type": "date", "label": "", "name": "data_registrazione", "required": 0, "value": "$data_registrazione$", "help": "" ]}
-
+
> {[ "type": "date", "label": "", "name": "data_competenza", "required": 1, "value": "$data_competenza$", "min-date": "$data_registrazione$", "help": "" ]}
@@ -166,7 +166,7 @@ if (empty($record['is_fiscale'])) { if ($dir == 'entrata') { ?> -
+
> {[ "type": "select", "label": "", "name": "codice_stato_fe", "required": 0, "values": "query=SELECT codice as id, CONCAT_WS(' - ',codice,descrizione) as text FROM fe_stati_documento", "value": "$codice_stato_fe$", "disabled": , "class": "unblockable", "help": "" ]}
@@ -174,7 +174,7 @@ if (empty($record['is_fiscale'])) { } ?> -
+
{[ "type": "select", "label": "", "name": "idstatodocumento", "required": 1, "values": "query=", "value": "$idstatodocumento$", "class": "unblockable", "extra": " onchange = \"if ($('#idstatodocumento option:selected').text()=='Pagato' || $('#idstatodocumento option:selected').text()=='Parzialmente pagato' ){if( confirm('') ){ return true; }else{ $('#idstatodocumento').selectSet(); }}\" " ]}
diff --git a/modules/fatture/init.php b/modules/fatture/init.php index 1ce37e090..c4550abb2 100644 --- a/modules/fatture/init.php +++ b/modules/fatture/init.php @@ -34,4 +34,5 @@ if (isset($id_record)) { WHERE co_tipidocumento.dir = '.prepare($dir).' AND co_documenti.id='.prepare($id_record)); $note_accredito = $dbo->fetchArray("SELECT co_documenti.id, IF(numero_esterno != '', numero_esterno, numero) AS numero, data FROM co_documenti JOIN co_tipidocumento ON co_documenti.idtipodocumento=co_tipidocumento.id WHERE reversed = 1 AND ref_documento=".prepare($id_record)); + $is_fiscale = $fattura->isFiscale(); }