1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-29 23:14:55 +01:00

fix: allineamento nomi file

This commit is contained in:
valentina 2025-01-14 16:06:31 +01:00
parent 78196739c5
commit cdf176e61b
2 changed files with 28 additions and 1 deletions

15
update/2_6_2.php Normal file
View File

@ -0,0 +1,15 @@
<?php
include __DIR__.'/../config.inc.php';
$directory = 'files/fatture/';
$files = glob($directory.'*.');
foreach ($files as $file) {
$newFilename = str_replace('.', '.xml', $file);
rename($file, $newFilename);
}

View File

@ -3,4 +3,16 @@ ALTER TABLE `mg_articoli_lang` CHANGE `title` `title` TEXT NOT NULL;
-- Correzione per file senza estensione
UPDATE zz_files SET filename = CONCAT(filename, 'xml') WHERE filename LIKE '%.';
UPDATE `zz_files` SET name = 'Ricevuta RC' WHERE `name` LIKE 'Ricevuta R';
UPDATE `zz_files` SET name = 'Ricevuta AT' WHERE `original` = 'Ricevuta AT';
UPDATE `zz_files` SET name = 'Ricevuta DT' WHERE `original` = 'Ricevuta DT';
UPDATE `zz_files` SET name = 'Ricevuta EC01' WHERE `original` = 'Ricevuta EC01';
UPDATE `zz_files` SET name = 'Ricevuta EC02' WHERE `original` = 'Ricevuta EC02';
UPDATE `zz_files` SET name = 'Ricevuta ERR' WHERE `original` = 'Ricevuta ERR';
UPDATE `zz_files` SET name = 'Ricevuta ERVAL' WHERE `original` = 'Ricevuta ERVAL';
UPDATE `zz_files` SET name = 'Ricevuta GEN' WHERE `original` = 'Ricevuta GEN';
UPDATE `zz_files` SET name = 'Ricevuta MC' WHERE `original` = 'Ricevuta MC';
UPDATE `zz_files` SET name = 'Ricevuta NE' WHERE `original` = 'Ricevuta NE';
UPDATE `zz_files` SET name = 'Ricevuta NS' WHERE `original` = 'Ricevuta NS';
UPDATE `zz_files` SET name = 'Ricevuta RC' WHERE `original` = 'Ricevuta RC';
UPDATE `zz_files` SET name = 'Ricevuta WAIT' WHERE `original` = 'Ricevuta WAIT';