1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-15 17:07:00 +01:00

Fix inserimento seriali

This commit is contained in:
loviuz 2021-02-18 11:40:38 +01:00
parent b3fb4e882b
commit 412ff5e770

View File

@ -121,14 +121,18 @@ abstract class Article extends Accounting
}
// Inversione di movimento nei seriali in caso di nota di credito
if($this->getDocument()->isNota()){
if($this->getDirection()=='uscita'){
$dir = 'entrata';
} else{
$dir = 'uscita';
$dir = $this->getDirection();
$document = $this->getDocument();
if ($document instanceof \Modules\Fatture\Fattura) {
if ($document->isNota()) {
if($this->getDirection()=='uscita'){
$dir = 'entrata';
} else{
$dir = 'uscita';
}
}
} else {
$dir = $this->getDirection();
}
$serials = array_clean($serials);