From aa56de0a18fe1412d8737920549ea5918a87bad1 Mon Sep 17 00:00:00 2001 From: Fabio Lovato Date: Tue, 29 Jan 2019 13:13:24 +0100 Subject: [PATCH] Aggiunta idsede negli ordini --- modules/ddt/actions.php | 1 + modules/ordini/crea_documento.php | 2 ++ modules/ordini/edit.php | 10 ++++++++++ 3 files changed, 13 insertions(+) diff --git a/modules/ddt/actions.php b/modules/ddt/actions.php index 33278ae23..807ed4587 100644 --- a/modules/ddt/actions.php +++ b/modules/ddt/actions.php @@ -203,6 +203,7 @@ switch (post('op')) { $totale_ordine = 0.00; $data = post('data'); $idanagrafica = post('idanagrafica'); + $idsede = post('idsede'); $idpagamento = post('idpagamento'); $idconto = post('idconto'); $idordine = post('idordine'); diff --git a/modules/ordini/crea_documento.php b/modules/ordini/crea_documento.php index 1a8ba9526..dfce55d91 100644 --- a/modules/ordini/crea_documento.php +++ b/modules/ordini/crea_documento.php @@ -36,6 +36,7 @@ $button = !empty(get('op')) ? tr('Aggiungi') : $button; $rs = $dbo->fetchArray('SELECT * FROM '.$table.' WHERE id='.prepare($id_record)); $numero = !empty($rs[0]['numero_esterno']) ? $rs[0]['numero_esterno'] : $rs[0]['numero']; $idanagrafica = $rs[0]['idanagrafica']; +$idsede = $rs[0]['idsede']; $idpagamento = $rs[0]['idpagamento']; $idconto = $rs[0]['idconto']; @@ -55,6 +56,7 @@ if (!empty($rs)) {
+ diff --git a/modules/ordini/edit.php b/modules/ordini/edit.php index 191e77884..aeecf87d8 100644 --- a/modules/ordini/edit.php +++ b/modules/ordini/edit.php @@ -73,6 +73,10 @@ if ($module['name'] == 'Ordini cliente') { } ?> + +
+ {[ "type": "select", "label": "", "name": "idsede", "required": 1, "ajax-source": "sedi", "value": "", "readonly": "" ]} +
{[ "type": "select", "label": "", "name": "idpagamento", "required": 1, "values": "query=SELECT id, descrizione FROM co_pagamenti GROUP BY descrizione ORDER BY descrizione ASC", "value": "$idpagamento$", "readonly": "" ]} @@ -228,4 +232,10 @@ if ($record['flag_completato']) { + +$('#idanagrafica').change( function(){ + session_set('superselect,idanagrafica', $(this).val(), 0); + + $("#idsede").selectReset(); +});