Skip to content

Commit 0a32be4

Browse files
committed
fix: selezione tipo documento in generazione nota di credito
1 parent 7732ed7 commit 0a32be4

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
@@ -916,7 +916,7 @@
916916
$data = post('data');
917917

918918
$anagrafica = $fattura->anagrafica;
919-
$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'];
919+
$id_tipo = database()->fetchOne('SELECT `co_tipidocumento`.`id` FROM `co_tipidocumento` WHERE `name` = "Nota di credito" AND `dir` = "entrata"')['id'];
920920
$tipo = Tipo::find($id_tipo);
921921
$nota = Fattura::build($anagrafica, $tipo, $data, $id_segment);
922922
$nota->ref_documento = $fattura->id;

0 commit comments

Comments
 (0)