{"id":19776,"date":"2022-07-06T11:42:15","date_gmt":"2022-07-06T10:42:15","guid":{"rendered":"https:\/\/developers.primaverabss.com\/en\/questions\/aprovacao-e-pagamento-de-faturas\/"},"modified":"2022-07-06T18:08:36","modified_gmt":"2022-07-06T17:08:36","slug":"aprovacao-e-pagamento-de-faturas","status":"publish","type":"cma_thread","link":"https:\/\/developers.ila.cegid.com\/en\/forum\/aprovacao-e-pagamento-de-faturas\/","title":{"rendered":"Aprova\u00e7\u00e3o e pagamento de faturas"},"content":{"rendered":"<p>Caros,<\/p>\n<p>Estou a tentar aprovar e fazer o pagamento de faturas pelo motor, e o codigo da esse erro.<\/p>\n<blockquote>\n<p>Primavera.Platform.Exceptions.ExpectedException: &#8216;O Valor do documento \u00e9 ZERO.<br \/>\nO valor total do documento de liquida\u00e7\u00e3o tem que gerar um valor em excesso.<\/p>\n<\/blockquote>\n<p><strong>Codigo exemplo.<\/strong><\/p>\n<blockquote>\n<p>CctBEDocumentoLiq dl = new CctBEDocumentoLiq();<br \/>\ndl.Filial = &#8220;000&#8221;;<br \/>\ndl.Tipodoc = &#8220;APR&#8221;;<br \/>\ndl.Serie = &#8220;2021&#8221;;<br \/>\ndl.Entidade = &#8220;0001&#8221;;<br \/>\ndl.TipoEntidade = &#8220;F&#8221;;<br \/>\nPriEngine.Engine.PagamentosRecebimentos.Liquidacoes.PreencheDadosRelacionados(dl);<\/p>\n<p>dl.DataDoc = Convert.ToDateTime(&#8220;2021\/12\/31&#8221;);<br \/>\ndl.DataIntroducao = Convert.ToDateTime(&#8220;2021\/12\/31&#8221;);<br \/>\ndl.ValorRec = -1230.00;<br \/>\nPriEngine.Engine.PagamentosRecebimentos.Liquidacoes.Actualiza(dl);<\/p>\n<\/blockquote>\n<p>Perguntas:<\/p>\n<p>Onde indico a fatura para aprova\u00e7\u00e3o?<\/p>\n<p>O processo de Liquidacoes pode ser utilizado tanto para aprovar quanto para pagar?<\/p>\n<p>&nbsp;<\/p>\n<p>Obrigado!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Caros, Estou a tentar aprovar e fazer o pagamento de faturas pelo motor, e o codigo da esse erro. Primavera.Platform.Exceptions.ExpectedException: &#8216;O Valor do documento \u00e9 ZERO. O valor total do documento de liquida\u00e7\u00e3o tem que gerar um valor em excesso. Codigo exemplo. CctBEDocumentoLiq dl = new CctBEDocumentoLiq(); dl.Filial = &#8220;000&#8221;; dl.Tipodoc = &#8220;APR&#8221;; dl.Serie = [&hellip;]<\/p>\n","protected":false},"author":1639,"featured_media":0,"template":"","tags":[],"cma_category":[],"cma_difficulty_level":[],"forum-tag":[370,374],"class_list":["post-19776","cma_thread","type-cma_thread","status-publish","hentry","forum-tag-integration","forum-tag-v10-en","forum-languages-pt"],"_links":{"self":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/cma_thread\/19776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/cma_thread"}],"about":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/types\/cma_thread"}],"author":[{"embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/users\/1639"}],"wp:attachment":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/media?parent=19776"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/tags?post=19776"},{"taxonomy":"cma_category","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/cma_category?post=19776"},{"taxonomy":"cma_difficulty_level","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/cma_difficulty_level?post=19776"},{"taxonomy":"forum-tag","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/forum-tag?post=19776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}