mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-16 19:40:44 +01:00
Correzioni minori
This commit is contained in:
parent
bf2b4e24bc
commit
77b26a318f
@ -29,24 +29,22 @@ switch ($resource) {
|
||||
$query = 'SELECT or_ordini.id AS id,
|
||||
CONCAT("Ordine ", numero, " del ", DATE_FORMAT(data, "%d/%m/%Y"), " [", (SELECT `descrizione` FROM `or_statiordine` WHERE `or_statiordine`.`id` = `idstatoordine`) , "]") AS descrizione
|
||||
FROM or_ordini
|
||||
INNER JOIN or_tipiordine ON or_ordini.idtipoordine = or_tipiordine.id
|
||||
INNER JOIN an_anagrafiche ON or_ordini.idanagrafica = an_anagrafiche.idanagrafica
|
||||
|where|
|
||||
ORDER BY id';
|
||||
ORDER BY or_ordini.id';
|
||||
|
||||
foreach ($elements as $element) {
|
||||
$filter[] = 'id='.prepare($element);
|
||||
$filter[] = 'or_ordini.id='.prepare($element);
|
||||
}
|
||||
|
||||
$where[] = 'or_tipiordine.dir='.prepare('entrata');
|
||||
if (empty($elements)) {
|
||||
$where[] = 'an_anagrafiche.idanagrafica='.prepare($superselect['idanagrafica']);
|
||||
|
||||
$stato = !empty($superselect['stato']) ? $superselect['stato'] : 'completato';
|
||||
$where[] = 'idstatoordine IN (SELECT `id` FROM `or_statiordine` WHERE '.$stato.' = 1)';
|
||||
}
|
||||
|
||||
if (!empty($search)) {
|
||||
$search_fields[] = 'nome LIKE '.prepare('%'.$search.'%');
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -307,7 +307,7 @@ UPDATE `zz_views` SET `name`='Conto avere' WHERE `name`='Conto avere_new';
|
||||
|
||||
-- Aggiunta campo per scelta ordine in intervento
|
||||
ALTER TABLE `in_interventi` ADD `id_ordine` INT(11) AFTER `id_contratto`;
|
||||
ALTER TABLE `in_interventi` ADD CONSTRAINT `in_interventi_ibfk_7` FOREIGN KEY (`id_ordine`) REFERENCES `or_ordini`(`id`) ON DELETE CASCADE;
|
||||
ALTER TABLE `in_interventi` ADD FOREIGN KEY (`id_ordine`) REFERENCES `or_ordini`(`id`) ON DELETE CASCADE;
|
||||
|
||||
-- Aggiunta plugin consuntivo per ordini
|
||||
INSERT INTO `zz_plugins` (`id`, `name`, `title`, `idmodule_from`, `idmodule_to`, `position`, `script`, `enabled`, `default`, `order`, `compatibility`, `version`, `options2`, `options`, `directory`, `help`) VALUES
|
||||
|
Loading…
x
Reference in New Issue
Block a user