From c38e1738ced9b97417ba3b57218107f35429427d Mon Sep 17 00:00:00 2001 From: Beppe Date: Thu, 15 Oct 2020 12:24:22 +0200 Subject: [PATCH] Movimento di carico in fase di aggiunta rapida articolo --- modules/articoli/actions.php | 5 +++++ modules/articoli/add.php | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/articoli/actions.php b/modules/articoli/actions.php index 644078220..0d5875796 100755 --- a/modules/articoli/actions.php +++ b/modules/articoli/actions.php @@ -55,6 +55,11 @@ switch (post('op')) { $articolo->setPrezzoVendita(post('prezzo_vendita'), post('idiva_vendita')); $articolo->save(); + if( !empty(post('qta')) ){ + $data_movimento = new Carbon(); + $articolo->movimenta(post('qta'), tr('Carico manuale'), $data_movimento->format('Y-m-d'), true); + } + $id_record = $articolo->id; if (isAjaxRequest()) { diff --git a/modules/articoli/add.php b/modules/articoli/add.php index ce8eb547d..845020d53 100755 --- a/modules/articoli/add.php +++ b/modules/articoli/add.php @@ -58,11 +58,15 @@ include_once __DIR__.'/../../core.php';
-
+
{[ "type": "number", "label": "", "name": "prezzo_acquisto", "icon-after": "" ]}
-
+
+ {[ "type": "number", "label": "", "name": "qta", "decimals": "qta" ]} +
+ +
{[ "type": "number", "label": "", "name": "threshold_qta", "decimals": "qta", "min-value": "undefined" ]}