mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 03:51:06 +01:00
Fix esportazione csv fatture
This commit is contained in:
parent
0e1a92b2be
commit
5c2d6c1c7d
@ -50,7 +50,7 @@ class CSV extends CSVExporter
|
||||
'label' => 'Ragione sociale',
|
||||
],
|
||||
[
|
||||
'field' => 'totale',
|
||||
'field' => 'totaleCSV',
|
||||
'label' => 'Totale',
|
||||
],
|
||||
[
|
||||
|
@ -898,4 +898,14 @@ class Fattura extends Document
|
||||
{
|
||||
return $this->anagrafica->ragione_sociale;
|
||||
}
|
||||
|
||||
public function getTotaleCSVAttribute()
|
||||
{
|
||||
$totale = $this->totale_imponibile + $this->iva + $this->rivalsa_inps + $this->iva_rivalsa_inps;
|
||||
if($this->isNota()){
|
||||
return $totale*(-1);
|
||||
}else{
|
||||
return $totale;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user