mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-03 09:17:37 +01:00
Aggiunta inversione importi in prima nota se nota di accredito
This commit is contained in:
parent
a420572820
commit
2da96f93ac
@ -21,6 +21,12 @@ include_once __DIR__.'/../../core.php';
|
||||
$numero_doc = !empty($rs[0]['numero_esterno']) ? $rs[0]['numero_esterno'] : $rs[0]['numero'];
|
||||
$tipo_doc = $rs[0]['tdescrizione'];
|
||||
|
||||
$nota_accredito = false;
|
||||
|
||||
if( $tipo_doc == 'Nota di accredito' ){
|
||||
$nota_accredito = true;
|
||||
}
|
||||
|
||||
$descrizione = tr('_DOC_ numero _NUM_ del _DATE_ (_NAME_)', [
|
||||
'_DOC_' => $tipo_doc,
|
||||
'_NUM_' => $numero_doc,
|
||||
@ -182,6 +188,13 @@ include_once __DIR__.'/../../core.php';
|
||||
$value_avere = '';
|
||||
}
|
||||
|
||||
// Se è una nota di accredito, inverto i valori
|
||||
if( $nota_accredito ){
|
||||
$tmp = $value_dare;
|
||||
$value_dare = $value_avere;
|
||||
$value_avere= $tmp;
|
||||
}
|
||||
|
||||
// Dare
|
||||
echo '
|
||||
<td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user