mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-16 19:40:44 +01:00
Set sconto percentuale di default per documenti
This commit is contained in:
parent
b9009b944c
commit
d8820523a0
@ -145,7 +145,7 @@ abstract class Accounting extends Component
|
||||
*/
|
||||
public function getTipoScontoAttribute()
|
||||
{
|
||||
return $this->sconto_percentuale ? 'PRC' : 'UNT';
|
||||
return $this->sconto_percentuale ? 'PRC' : ($this->sconto ? 'UNT' : 'PRC');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -463,7 +463,7 @@ abstract class Accounting extends Component
|
||||
protected function fixSconto()
|
||||
{
|
||||
$this->attributes['sconto'] = $this->sconto;
|
||||
$this->attributes['tipo_sconto'] = $this->sconto_percentuale ? 'PRC' : 'UNT';
|
||||
$this->attributes['tipo_sconto'] = $this->sconto_percentuale ? 'PRC' : ($this->sconto ? 'UNT' : 'PRC');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user