This commit is contained in:
loviuz 2020-05-24 12:32:36 +02:00
parent c7fa7601c3
commit a71c45d4dd
1 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,7 @@
include_once __DIR__.'/../../core.php';
use Carbon\Carbon;
use Modules\Anagrafiche\Anagrafica;
use Modules\Articoli\Articolo as ArticoloOriginale;
use Modules\Preventivi\Components\Articolo;
@ -68,7 +69,9 @@ switch (post('op')) {
case 'copy':
// Copia del preventivo
$new = $preventivo->replicate();
$new->numero = Preventivo::getNextNumero($new->data_bozza);
$new->numero = Preventivo::getNextNumero( Carbon::now() );
$new->data_bozza = Carbon::now();
$new->data_conclusione = Carbon::now()->addMonth();
$new->stato = 'Bozza';
$new->save();