1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-14 02:20:46 +01:00

Aggiunto campo barcode nel listino fornitori

This commit is contained in:
MatteoPistorello 2022-02-16 16:29:13 +01:00
parent 06736fa355
commit e102acbc8c
5 changed files with 25 additions and 14 deletions

View File

@ -53,8 +53,8 @@ $clienti = DettaglioPrezzo::where('id_articolo', $id_articolo)
->groupBy('id_anagrafica');
if (!$clienti->isEmpty()) {
echo '
<table class="table table-condensed table-bordered">
<thead>
<table class="table table-striped table-condensed table-bordered">
<tbody>
<tr>
<th>'.tr('Cliente').'</th>
<th class="text-center" width="210">'.tr('Q. minima').'</th>
@ -62,10 +62,7 @@ if (!$clienti->isEmpty()) {
<th class="text-center" width="150">'.tr('Prezzo unitario').'</th>
<th class="text-center" width="150">'.tr('Sconto').'</th>
<th class="text-center" width="150">#</th>
</tr>
</thead>
<tbody>';
</tr>';
foreach ($clienti as $id_cliente => $prezzi) {
$anagrafica = $prezzi->first()->anagrafica;

View File

@ -42,6 +42,7 @@ switch (filter('op')) {
}
$fornitore->codice_fornitore = post('codice_fornitore');
$fornitore->barcode_fornitore = post('barcode_fornitore');
$fornitore->descrizione = post('descrizione');
$fornitore->qta_minima = post('qta_minima');
$fornitore->giorni_consegna = post('giorni_consegna');

View File

@ -52,9 +52,13 @@ echo '
<input type="hidden" name="id_articolo" value="'.$id_articolo.'">
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
{[ "type": "text", "label": "'.tr('Codice fornitore').'", "name": "codice_fornitore", "required": 1, "value": "'.$fornitore['codice_fornitore'].'" ]}
</div>
<div class="col-md-6">
{[ "type": "text", "label": "'.tr('Barcode').'", "name": "barcode_fornitore", "value": "'.$fornitore['barcode_fornitore'].'" ]}
</div>
</div>
<div class="row">

View File

@ -79,8 +79,9 @@ if (!$fornitori_disponibili->isEmpty()) {
echo '
<tr>
<th>'.tr('Fornitore').'</th>
<th width="150">'.tr('Codice').'</th>
<th>'.tr('Descrizione').'</th>
<th width="150">'.tr('Codice').'</th>
<th width="150">'.tr('Barcode').'</th>
<th class="text-center" width="210">'.tr('Q. minima ordinabile').'</th>
<th class="text-center" width="150">'.tr('Tempi di consegna').'</th>
<th class="text-center" width="150">#</th>
@ -93,12 +94,16 @@ if (!$fornitori_disponibili->isEmpty()) {
if (!empty($dettaglio)) {
echo '
<td>
'.$dettaglio['descrizione'].'
</td>
<td class="text-center">
'.$dettaglio['codice_fornitore'].'
</td>
<td>
'.$dettaglio['descrizione'].'
<td class="text-center">
'.$dettaglio['barcode_fornitore'].'
</td>
<td class="text-right">
@ -112,8 +117,9 @@ if (!$fornitori_disponibili->isEmpty()) {
</td>';
} else {
echo '
<td class="text-center">-</td>
<td>-</td>
<td class="text-center">-</td>
<td class="text-center">-</td>
<td class="text-right">-</td>
<td class="text-right">-</td>';
}
@ -152,7 +158,7 @@ if (!$fornitori_disponibili->isEmpty()) {
if (!empty($prezzi) && !$prezzi->isEmpty()) {
echo '
<tr>
<td></td>
<td colspan="2"></td>
<th class="text-center">'.tr('Q. minima').'</th>
<th class="text-center">'.tr('Q. massima').'</th>
<th class="text-center">'.tr('Prezzo unitario').'</th>
@ -163,7 +169,7 @@ if (!$fornitori_disponibili->isEmpty()) {
foreach ($prezzi as $key => $dettaglio) {
echo '
<tr '.(($anagrafica->id == $articolo->id_fornitore) ? 'class="success"' : '').'>
<td></td>
<td colspan="2"></td>
<td class="text-right">
'.($dettaglio->minimo ? numberFormat($dettaglio->minimo) : '-').'

View File

@ -12,4 +12,7 @@ INSERT INTO `zz_views` (`id_module`, `name`, `query`, `order`, `search`, `slow`,
((SELECT `id` FROM `zz_modules` WHERE `name` = 'Scadenzario'), 'icon_title_Inviato', 'IF(`email`.`id_email` IS NOT NULL, ''Inviato'', '''')', 17, 1, 0, 0, '', '', 0, 0, 1);
-- Set tipo intervento tempo_standard = 1
UPDATE `in_tipiintervento` SET `tempo_standard` = '1' WHERE `in_tipiintervento`.`tempo_standard` = 0 OR `in_tipiintervento`.`tempo_standard` IS NULL;
UPDATE `in_tipiintervento` SET `tempo_standard` = '1' WHERE `in_tipiintervento`.`tempo_standard` = 0 OR `in_tipiintervento`.`tempo_standard` IS NULL;
-- Aggiunto campo Barcode fornitore
ALTER TABLE `mg_fornitore_articolo` ADD `barcode_fornitore` VARCHAR(255) NOT NULL AFTER `codice_fornitore`;