mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-19 21:10:49 +01:00
parent
890a179233
commit
a4a6a88be6
@ -680,6 +680,10 @@ class FatturaElettronica
|
|||||||
// Righe del documento
|
// Righe del documento
|
||||||
$righe_documento = $fattura->getRighe();
|
$righe_documento = $fattura->getRighe();
|
||||||
foreach ($righe_documento as $numero => $riga) {
|
foreach ($righe_documento as $numero => $riga) {
|
||||||
|
$riga['subtotale'] = abs($riga['subtotale']);
|
||||||
|
$riga['qta'] = abs($riga['qta']);
|
||||||
|
$riga['sconto'] = abs($riga['sconto']);
|
||||||
|
|
||||||
$prezzo_unitario = $riga['subtotale'] / $riga['qta'];
|
$prezzo_unitario = $riga['subtotale'] / $riga['qta'];
|
||||||
$prezzo_totale = $riga['subtotale'] - $riga['sconto'];
|
$prezzo_totale = $riga['subtotale'] - $riga['sconto'];
|
||||||
|
|
||||||
|
@ -75,8 +75,10 @@ class FatturaElettronica
|
|||||||
|
|
||||||
public static function store($filename, $content)
|
public static function store($filename, $content)
|
||||||
{
|
{
|
||||||
$file = static::getImportDirectory().'/'.$filename;
|
$directory = static::getImportDirectory();
|
||||||
|
$file = $directory.'/'.$filename;
|
||||||
|
|
||||||
|
directory($directory);
|
||||||
file_put_contents($file, $content);
|
file_put_contents($file, $content);
|
||||||
|
|
||||||
return $filename;
|
return $filename;
|
||||||
|
@ -162,14 +162,16 @@ class Backup
|
|||||||
'config.inc.php',
|
'config.inc.php',
|
||||||
],
|
],
|
||||||
'dirs' => [
|
'dirs' => [
|
||||||
basename($backup_dir),
|
|
||||||
'.couscous',
|
|
||||||
'node_modules',
|
'node_modules',
|
||||||
'tests',
|
'tests',
|
||||||
'tmp',
|
'tmp',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (starts_with($backup_dir, slashes(DOCROOT))) {
|
||||||
|
$ignores['dirs'][] = basename($backup_dir);
|
||||||
|
}
|
||||||
|
|
||||||
// Creazione backup in formato ZIP
|
// Creazione backup in formato ZIP
|
||||||
if (extension_loaded('zip')) {
|
if (extension_loaded('zip')) {
|
||||||
$result = Zip::create([
|
$result = Zip::create([
|
||||||
|
@ -25,3 +25,5 @@ INSERT INTO `zz_settings` (`id`, `nome`, `valore`, `tipo`, `editable`, `sezione`
|
|||||||
|
|
||||||
-- Allineo valore Iva predefinita secondo nuovi codici tabella co_iva
|
-- Allineo valore Iva predefinita secondo nuovi codici tabella co_iva
|
||||||
UPDATE `zz_settings` SET `valore` = (SELECT id FROM `co_iva` WHERE `codice` = 22 LIMIT 0,1) WHERE `nome` = 'Iva predefinita' AND `valore` = 91;
|
UPDATE `zz_settings` SET `valore` = (SELECT id FROM `co_iva` WHERE `codice` = 22 LIMIT 0,1) WHERE `nome` = 'Iva predefinita' AND `valore` = 91;
|
||||||
|
|
||||||
|
UPDATE `zz_modules` SET `directory` = 'backups' WHERE `name` = 'Backup';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user