mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-09 08:08:39 +01:00
Fix #825
This commit is contained in:
parent
c7fa7601c3
commit
a71c45d4dd
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
use Modules\Anagrafiche\Anagrafica;
|
use Modules\Anagrafiche\Anagrafica;
|
||||||
use Modules\Articoli\Articolo as ArticoloOriginale;
|
use Modules\Articoli\Articolo as ArticoloOriginale;
|
||||||
use Modules\Preventivi\Components\Articolo;
|
use Modules\Preventivi\Components\Articolo;
|
||||||
@ -68,7 +69,9 @@ switch (post('op')) {
|
|||||||
case 'copy':
|
case 'copy':
|
||||||
// Copia del preventivo
|
// Copia del preventivo
|
||||||
$new = $preventivo->replicate();
|
$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->stato = 'Bozza';
|
||||||
$new->save();
|
$new->save();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user