1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-03-27 16:40:11 +01:00

Fix duplicazione fattura con bollo

This commit is contained in:
MatteoPistorello 2021-04-22 09:57:17 +02:00
parent c601391d6f
commit c5ef9e93b6
2 changed files with 4 additions and 1 deletions

View File

@ -312,7 +312,7 @@ switch (post('op')) {
$id_record = $new->id;
$righe = $fattura->getRighe();
$righe = $fattura->getRighe()->where('id', '!=', $fattura->id_riga_bollo);
foreach ($righe as $riga) {
$new_riga = $riga->replicate();
$new_riga->setDocument($new);

View File

@ -536,6 +536,9 @@ class Fattura extends Document
*/
public function save(array $options = [])
{
// Salvataggio effettivo
$result = parent::save($options);
// Fix dei campi statici
$this->id_riga_bollo = $this->gestoreBollo->manageRigaMarcaDaBollo();