diff --git a/include/common/riga.php b/include/common/riga.php index 5dffdeee5..6c7dbd4c0 100755 --- a/include/common/riga.php +++ b/include/common/riga.php @@ -16,7 +16,7 @@ echo ' // Quantità echo '
- {[ "type": "number", "label": "'.tr('Q.tà').'", "name": "qta", "required": 1, "value": "'.$result['qta'].'", "decimals": "qta"'.(isset($result['max_qta']) ? ', "icon-after": "/ '.numberFormat($result['max_qta'], 'qta').' "' : '').', "min-value": "'.Translator::numberToLocale($result['qta_evasa']).'" ]} + {[ "type": "number", "label": "'.tr('Q.tà').'", "name": "qta", "required": 1, "value": "'.$result['qta'].'", "decimals": "qta"'.(isset($result['max_qta']) ? ', "icon-after": "/ '.numberFormat($result['max_qta'], 'qta').' "' : '').', "min-value": "'.Translator::numberToLocale($result['qta_evasa']).'" ]}
'; // Unità di misura diff --git a/include/src/Components/Description.php b/include/src/Components/Description.php index 3d2c12bd9..d2caa64f4 100755 --- a/include/src/Components/Description.php +++ b/include/src/Components/Description.php @@ -151,7 +151,7 @@ abstract class Description extends Model * * @return self */ - public function copiaIn(Document $document, $qta = null, $is_evasione = true) + public function copiaIn(Document $document, $qta = null) { // Individuazione classe di destinazione $class = get_class($document); @@ -183,6 +183,7 @@ abstract class Description extends Model unset($attributes[$model->getParentID()]); // Riferimento di origine per l'evasione automatica della riga + $is_evasione = true; if ($is_evasione) { $model->original_id = $this->id; $model->original_type = $current; @@ -191,7 +192,7 @@ abstract class Description extends Model // Impostazione del genitore $model->setParent($document); - // Azioni specifiche di inizalizzazione + // Azioni specifiche di inizializzazione $model->customInitCopiaIn($this); $model->save(); diff --git a/include/src/Components/Row.php b/include/src/Components/Row.php index 917044958..a27cad21a 100755 --- a/include/src/Components/Row.php +++ b/include/src/Components/Row.php @@ -23,6 +23,7 @@ abstract class Row extends Description protected $appends = [ 'prezzo_unitario_corrente', 'sconto_unitario_corrente', + 'max_qta', ]; public static function build(Document $document, $bypass = false)