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:
parent
c601391d6f
commit
c5ef9e93b6
@ -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);
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user