mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-20 13:31:04 +01:00
Compare commits
8 Commits
731d7e654c
...
0817e12cde
Author | SHA1 | Date | |
---|---|---|---|
|
0817e12cde | ||
|
268ae98a3c | ||
|
ed9f8e1d23 | ||
|
ee12979c60 | ||
|
4b631a251d | ||
|
bfc5b5642e | ||
|
e7097bef9b | ||
|
39c325ecfa |
@ -119,7 +119,10 @@ Il formato utilizzato è basato sulle linee guida di [Keep a Changelog](http://k
|
||||
- Corretta l'indicazione della scadenza da pagare in Fatture
|
||||
- Corretta la creazione di una nota di debito
|
||||
- Corretto il controllo su stati contratti omonimi al salvataggio
|
||||
|
||||
- Corrette le api dell'applicazione
|
||||
- Corretta la generazione di righe vuote nelle stampe delle fatture
|
||||
- Corretta la cartella di riferimento in fase di importazione delle fatture di acquisto
|
||||
- Corretti gli arrotondamenti automatici in fase di importazione fatture di acquisto
|
||||
|
||||
## 2.5.5 (2024-09-27)
|
||||
### Aggiunto (Added)
|
||||
|
20
README.md
20
README.md
@ -62,9 +62,9 @@ L'installazione del gestionale richiede la presenza di un server web con abilita
|
||||
|
||||
| PHP | EOL | Supportato |
|
||||
|-----|-----|:----------:|
|
||||
| 8.3 | 23/11/2026 | ✔️ |
|
||||
| 8.2 | 08/12/2025 | ✔️ |
|
||||
| 8.1 | 25/11/2024 | ✔️ |
|
||||
| 8.3 | 31/12/2027 | ✔️ |
|
||||
| 8.2 | 31/12/2026 | ✔️ |
|
||||
| 8.1 | 31/12/2025 | ✔️ |
|
||||
| 8.0 | 26/11/2023 | ❌ |
|
||||
| 7.4 | 28/11/2022 | ❌ |
|
||||
| 7.3 | 06/12/2021 | ❌ |
|
||||
@ -74,18 +74,24 @@ L'installazione del gestionale richiede la presenza di un server web con abilita
|
||||
|
||||
| MYSQL | EOL | Supportato |
|
||||
|-----|-----|:----------:|
|
||||
| 8.3 | 30/04/2024 | ✔️ |
|
||||
| 8.2 | 31/01/2024 | ✔️ |
|
||||
| 9.1 | - | ❌ |
|
||||
| 9.0 | 15/10/2024 | ❌ |
|
||||
| 8.4 | 30/04/2032 | ✔️ |
|
||||
| 8.3 | 10/04/2024 | ✔️ |
|
||||
| 8.2 | 14/12/2023 | ✔️ |
|
||||
| 8.1 | 25/10/2023 | ✔️ |
|
||||
| 8.0 | 30/04/2026 | ✔️ |
|
||||
| 5.7 | 21/10/2023 | ✔️ |
|
||||
| 5.6 | 05/02/2021 | ❌ |
|
||||
| 5.7 | 31/10/2023 | ✔️ |
|
||||
| 5.6 | 28/02/2021 | ❌ |
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Fonte EOL PHP: [https://endoflife.date/php](https://endoflife.date/php)
|
||||
Fonte EOL MYSQL: [https://endoflife.date/mysql](https://endoflife.date/mysql)
|
||||
|
||||
❗Alcune dipendenze presenti dalla versione 2.5 non sono più compatibili con PHP 7.4 e PHP 8.0, dalla versione 2.5.3 sarà quindi richiesta una versione di php >= 8.1.
|
||||
|
||||
Per ulteriori informazioni, visitare la sezione [Installazione](https://docs.openstamanager.com/configurazione/installazione) della documentazione.
|
||||
|
@ -254,11 +254,11 @@ if (in_array($module->getTranslation('title'), ['Ordini cliente', 'Ordini fornit
|
||||
$confermato = $result['confermato'];
|
||||
}
|
||||
echo '
|
||||
<div class="card card-info collapsable collapsed-card">
|
||||
<div class="card card-info collapsed-card">
|
||||
<div class="card-header with-border">
|
||||
<h3 class="card-title">'.tr('Informazioni aggiuntive').'</h3>
|
||||
<div class="card-tools pull-right">
|
||||
<button type="button" class="btn btn-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -303,7 +303,7 @@ if (in_array($module->getTranslation('title'), ['Ordini cliente', 'Ordini fornit
|
||||
input("ora_evasione").set();
|
||||
}
|
||||
});
|
||||
</script>';
|
||||
</script>';
|
||||
}
|
||||
|
||||
if (in_array($module->getTranslation('title'), ['Fatture di vendita', 'Fatture di acquisto'])) {
|
||||
|
@ -82,17 +82,16 @@ class FatturaElettronica
|
||||
|
||||
public static function getImportDirectory()
|
||||
{
|
||||
if (!isset(self::$directory)) {
|
||||
$module = Module::where('name', 'Fatture di vendita')->first();
|
||||
$module = Module::where('name', 'Fatture di acquisto')->first();
|
||||
|
||||
$plugins = $module->plugins;
|
||||
if (!empty($plugins)) {
|
||||
$plugin = $plugins->first(fn ($value, $key) => $value->getTranslation('title') == 'Fatturazione Elettronica');
|
||||
$plugins = $module->plugins;
|
||||
if (!empty($plugins)) {
|
||||
$plugin = $plugins->first(fn ($value, $key) => $value->getTranslation('title') == 'Fatturazione Elettronica');
|
||||
|
||||
self::$directory = base_dir().'/'.$plugin->upload_directory;
|
||||
}
|
||||
self::$directory = base_dir().'/'.$plugin->upload_directory;
|
||||
}
|
||||
|
||||
|
||||
return self::$directory;
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ class FatturaOrdinaria extends FatturaElettronica
|
||||
// Calcolo la differenza IVA per aliquota, per creare una riga relativa all'arrotondamento IVA
|
||||
foreach ($riepiloghi_raggruppati as $riepilogo) {
|
||||
$valore = 0;
|
||||
$differenza_iva = round((float) $riepilogo['Imposta'] - $totale_imposta[$riepilogo['AliquotaIVA']], 2);
|
||||
$differenza_iva = round((float) $riepilogo['Imposta'] - round($totale_imposta[$riepilogo['AliquotaIVA']], 2), 2);
|
||||
|
||||
if ($differenza_iva) {
|
||||
$valore = $differenza_iva * 100 / ($riepilogo['AliquotaIVA'] ?: 1);
|
||||
@ -491,9 +491,9 @@ class FatturaOrdinaria extends FatturaElettronica
|
||||
$iva_arrotondamento = database()->fetchOne('SELECT * FROM `co_iva` WHERE `percentuale`= 0 AND `deleted_at` IS NULL LIMIT 1');
|
||||
if ($diff || $differenza_iva) {
|
||||
if ($diff && $differenza_iva) {
|
||||
$diff = abs($diff + $differenza_iva);
|
||||
$diff = ($diff + $differenza_iva) * '-1';
|
||||
} elseif ($diff == 0 && $differenza_iva) {
|
||||
$diff = $differenza_iva;
|
||||
$diff = $differenza_iva * '-1';
|
||||
} else {
|
||||
$diff = -$diff;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ class WidgetManager implements ManagerInterface
|
||||
$database = database();
|
||||
|
||||
// Widget richiesto
|
||||
$widget = $database->fetchArray('SELECT * FROM `zz_widgets` LEFT JOIN `zz_widgets_lang` ON (`zz_widgets`.`id` = `zz_widgets_lang`.`id_record` AND `zz_widgets_lang`.`id_lang` = '.prepare(\Models\Locale::getDefault()->id).') WHERE `zz_widgets`.`id` = '.prepare($options['id']))[0];
|
||||
$widget = $database->fetchArray('SELECT `zz_widgets`.*, `zz_widgets_lang`.`text` FROM `zz_widgets` LEFT JOIN `zz_widgets_lang` ON (`zz_widgets`.`id` = `zz_widgets_lang`.`id_record` AND `zz_widgets_lang`.`id_lang` = '.prepare(\Models\Locale::getDefault()->id).') WHERE `zz_widgets`.`id` = '.prepare($options['id']))[0];
|
||||
|
||||
$result = ' ';
|
||||
|
||||
|
@ -29,9 +29,10 @@ class Autofill
|
||||
protected $space = 0;
|
||||
protected $current = 0;
|
||||
|
||||
protected $max_rows = 20;
|
||||
protected $max_rows_first_page = 20;
|
||||
protected $max_additional = 15;
|
||||
protected $max_rows = 26;
|
||||
protected $max_rows_first_page = 38;
|
||||
protected $max_additional = 0;
|
||||
|
||||
|
||||
public function __construct(protected $column_number, protected $char_number = 70)
|
||||
{
|
||||
@ -41,32 +42,25 @@ class Autofill
|
||||
{
|
||||
$this->max_rows = $rows;
|
||||
|
||||
$this->max_additional = $additional ?? floor($this->max_rows - $this->max_rows / 4);
|
||||
$this->max_rows_first_page = $first_page ?? $rows;
|
||||
$this->max_additional = $additional ?: $this->max_rows;
|
||||
$this->max_rows_first_page = $first_page ?? $this->max_rows_first_page;
|
||||
}
|
||||
|
||||
public function count($text, $small = false)
|
||||
{
|
||||
$count = ceil(strlen((string) $text) / $this->char_number);
|
||||
$count += substr_count((string) $text, PHP_EOL);
|
||||
$count += substr_count((string) $text, '<br>');
|
||||
|
||||
// Ricerca dei caratteri a capo
|
||||
preg_match_all("/(\r\n|\r|\n)/", (string) $text, $matches);
|
||||
$count += count($matches[0]);
|
||||
|
||||
if ($small) {
|
||||
$count = $count / 3;
|
||||
}
|
||||
$count = ($count == 1 ? $count : $count / 1.538461538 );
|
||||
|
||||
$this->set($count);
|
||||
}
|
||||
|
||||
public function set($count)
|
||||
{
|
||||
if ($count > $this->current) {
|
||||
$this->current = $count;
|
||||
}
|
||||
$this->current += $count;
|
||||
}
|
||||
|
||||
public function next()
|
||||
@ -77,11 +71,20 @@ class Autofill
|
||||
|
||||
public function getAdditionalNumber()
|
||||
{
|
||||
$page = ceil($this->space / $this->max_rows_first_page);
|
||||
if ($page > 1) {
|
||||
$rows = floor($this->space) % $this->max_rows;
|
||||
if ($this->space <= $this->max_rows) {
|
||||
$page = 1;
|
||||
} else {
|
||||
$rows = floor($this->space) % $this->max_rows_first_page;
|
||||
if ($this->space <= $this->max_rows_first_page) {
|
||||
$page = 2;
|
||||
} else {
|
||||
$page = ceil(1 + (($this->space - $this->max_rows_first_page) / $this->max_rows));
|
||||
}
|
||||
}
|
||||
|
||||
if ($page > 1) {
|
||||
$rows = $this->space - $this->max_rows_first_page * ($page - 1);
|
||||
} else {
|
||||
$rows = floor($this->space);
|
||||
}
|
||||
|
||||
$number = $this->max_additional - $rows;
|
||||
|
@ -25,9 +25,9 @@ $v_totale = [];
|
||||
$prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA');
|
||||
|
||||
// Creazione righe fantasma
|
||||
$autofill = new Util\Autofill(6, 40);
|
||||
$rows_per_page = $rows_per_page ?: ($fattura_accompagnatoria ? 13 : 25);
|
||||
$autofill->setRows($rows_per_page);
|
||||
$autofill = new Util\Autofill(6, 70);
|
||||
$rows_per_page = $rows_per_page ?: ($fattura_accompagnatoria ? 13 : 26);
|
||||
$autofill->setRows($rows_per_page, 0);
|
||||
|
||||
// Intestazione tabella per righe
|
||||
echo "
|
||||
@ -52,13 +52,6 @@ if (setting('Raggruppa attività per tipologia in fattura')) {
|
||||
$righe = $documento->getRighe();
|
||||
}
|
||||
|
||||
if (count($righe) > 25) {
|
||||
if (!empty($options['last-page-footer'])) {
|
||||
$rows_per_page += 5;
|
||||
$autofill->setRows($rows_per_page);
|
||||
}
|
||||
}
|
||||
|
||||
$num = 0;
|
||||
|
||||
if (!setting('Visualizza riferimento su ogni riga in stampa')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user