1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-03 09:17:37 +01:00
This commit is contained in:
loviuz 2020-05-24 12:32:36 +02:00
parent c7fa7601c3
commit a71c45d4dd

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();