Aggiornamento date vuote su movimenti

This commit is contained in:
Beppe 2020-11-10 14:55:00 +01:00
parent 353e65c0ce
commit 1b0f2577c7
2 changed files with 4 additions and 0 deletions

View File

@ -72,6 +72,7 @@ class Articolo extends Model
*/
public function movimenta($qta, $descrizone = null, $data = null, $manuale = false, $array = [])
{
$data = ($data ?: date("Y-m-d H:i:s"));
$id = $this->registra($qta, $descrizone, $data, $manuale, $array);
if ($this->servizio == 0) {

View File

@ -44,3 +44,6 @@ ALTER TABLE `in_righe_interventi` ADD `qta_evasa` decimal(15, 6) NOT NULL AFTER
UPDATE `in_righe_interventi` SET `in_righe_interventi`.`qta_evasa` = `in_righe_interventi`.`qta` WHERE `in_righe_interventi`.`idintervento` IN (
SELECT DISTINCT( `idintervento`) FROM `co_righe_documenti` WHERE `idintervento` IS NOT NULL
);
-- Aggiornamento date vuote su movimenti
UPDATE `mg_movimenti` SET `data`=`created_at` WHERE `data` IS NULL;