Skip to content

Commit e410e5d

Browse files
committed
fix: selezione tipo documento in generazione nota di credito
1 parent 2a6bb14 commit e410e5d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/fatture/actions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@
10181018
$data = post('data');
10191019

10201020
$anagrafica = $fattura->anagrafica;
1021-
$id_tipo = database()->fetchOne('SELECT `co_tipidocumento`.`id` FROM `co_tipidocumento` LEFT JOIN `co_tipidocumento_lang` ON (`co_tipidocumento_lang`.`id_record` = `co_tipidocumento`.`id` AND `co_tipidocumento_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `title` = "Nota di credito" AND `dir` = "entrata"')['id'];
1021+
$id_tipo = database()->fetchOne('SELECT `co_tipidocumento`.`id` FROM `co_tipidocumento` WHERE `name` = "Nota di credito" AND `dir` = "entrata"')['id'];
10221022
$tipo = Tipo::find($id_tipo);
10231023
$nota = Fattura::build($anagrafica, $tipo, $data, $id_segment);
10241024
$nota->ref_documento = $fattura->id;

0 commit comments

Comments
 (0)