mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-08 23:58:42 +01:00
Fix emissione fatture da bulk
This commit is contained in:
parent
c4b720a7bc
commit
dd73099b14
@ -459,9 +459,13 @@ switch (post('op')) {
|
|||||||
case 'change-stato':
|
case 'change-stato':
|
||||||
$list = [];
|
$list = [];
|
||||||
$new_stato = Stato::where('descrizione', 'Emessa')->first();
|
$new_stato = Stato::where('descrizione', 'Emessa')->first();
|
||||||
|
$fatture = Fattura::vendita()
|
||||||
|
->whereIn('id', $id_records)
|
||||||
|
->orderBy('data')
|
||||||
|
->get();
|
||||||
|
|
||||||
foreach ($id_records as $id) {
|
foreach ($fatture as $fattura) {
|
||||||
$fattura = Fattura::find($id);
|
$fattura = Fattura::find($fattura['id']);
|
||||||
$stato_precedente = Stato::find($fattura->idstatodocumento);
|
$stato_precedente = Stato::find($fattura->idstatodocumento);
|
||||||
|
|
||||||
if ($stato_precedente->descrizione == 'Bozza' && $fattura->isFiscale()) {
|
if ($stato_precedente->descrizione == 'Bozza' && $fattura->isFiscale()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user