Fix inserimento articoli in ddt e fatture di acquisto

This commit is contained in:
Pek5892 2023-02-24 13:01:23 +01:00
parent a80e82f40d
commit b543102f02
4 changed files with 4 additions and 4 deletions

View File

@ -562,7 +562,7 @@ switch (filter('op')) {
case 'add_articolo':
$id_articolo = post('id_articolo');
$barcode = post('barcode');
$dir = 'entrata';
if (!empty($barcode)) {
$id_articolo = $dbo->selectOne('mg_articoli', 'id', ['deleted_at' => null, 'barcode' => $barcode])['id'];

View File

@ -383,7 +383,7 @@ if (!$block_edit) {
</div>
<div class="col-md-4">
{[ "type": "select", "label": "'.tr('Articolo').'", "name": "id_articolo", "value": "", "ajax-source": "articoli", "icon-after": "add|'.Modules::get('Articoli')['id'].'" ]}
{[ "type": "select", "label": "'.tr('Articolo').'", "name": "id_articolo", "value": "", "ajax-source": "articoli", "select-options": {"permetti_movimento_a_zero": '.($dir == 'entrata' ? 0 : 1).'}, "icon-after": "add|'.Modules::get('Articoli')['id'].'" ]}
</div>
<div class="col-md-4" style="margin-top: 25px">

View File

@ -934,7 +934,7 @@ switch (post('op')) {
case 'add_articolo':
$id_articolo = post('id_articolo');
$barcode = post('barcode');
$dir = 'entrata';
if (!empty($barcode)) {
$id_articolo = $dbo->selectOne('mg_articoli', 'id', ['deleted_at' => null, 'barcode' => $barcode])['id'];

View File

@ -817,7 +817,7 @@ if (!$block_edit) {
</div>
<div class="col-md-4">
{[ "type": "select", "label": "'.tr('Articolo').'", "name": "id_articolo", "value": "", "ajax-source": "articoli", "icon-after": "add|'.Modules::get('Articoli')['id'].'" ]}
{[ "type": "select", "label": "'.tr('Articolo').'", "name": "id_articolo", "value": "", "ajax-source": "articoli", "select-options": {"permetti_movimento_a_zero": '.($dir == 'entrata' ? 0 : 1).'}, "icon-after": "add|'.Modules::get('Articoli')['id'].'" ]}
</div>
<div class="col-md-4" style="margin-top: 25px">