1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-27 00:06:14 +01:00
openstamanager/modules/ordini/init.php

13 lines
1001 B
PHP
Raw Normal View History

<?php
include_once __DIR__.'/../../core.php';
if (isset($id_record)) {
2018-03-30 01:57:00 +02:00
// Aggiornamento stato di questo ordine (?)
2018-07-08 18:11:17 +02:00
if (!empty(get_stato_ordine($id_record)) && setting('Cambia automaticamente stato ordini fatturati')) {
2018-06-26 14:30:26 +02:00
$dbo->query('UPDATE or_ordini SET idstatoordine=(SELECT id FROM or_statiordine WHERE descrizione="'.get_stato_ordine($id_record).'") WHERE id='.prepare($id_record));
2018-05-22 14:41:42 +02:00
}
2018-05-11 15:56:08 +02:00
2018-07-18 15:20:10 +02:00
$record = $dbo->fetchOne('SELECT *, or_ordini.note, or_ordini.idpagamento, or_ordini.id AS idordine, or_statiordine.descrizione AS `stato`, or_tipiordine.descrizione AS `descrizione_tipodoc`, (SELECT completato FROM or_statiordine WHERE or_statiordine.id=or_ordini.idstatoordine) AS flag_completato FROM ((or_ordini LEFT OUTER JOIN or_statiordine ON or_ordini.idstatoordine=or_statiordine.id) INNER JOIN an_anagrafiche ON or_ordini.idanagrafica=an_anagrafiche.idanagrafica) INNER JOIN or_tipiordine ON or_ordini.idtipoordine=or_tipiordine.id WHERE or_ordini.id='.prepare($id_record));
}