From cc6ecac0aa57465b7056d59502689f2d13d94c35 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 29 Oct 2010 23:25:28 +0000 Subject: [PATCH] Patch level : 10.0 patch 832 Files correlati : ve0.exe ve6.exe Ricompilazione Demo : [ ] Commento Bug 0001721: Contabilizzazione partite (ve0.exe ve6.exe) Si richiede di intestare, se impostato in cnonfigurazione, la partita col numero di protocollo anche per gli acquisti Bisogna controllare anche gli altri casi con numero di documento cioe' vendite acquisti e mote di credito git-svn-id: svn://10.65.10.50/branches/R_10_00@21094 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ve/velib04b.cpp | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/ve/velib04b.cpp b/ve/velib04b.cpp index 31fb7b75d..2fa355d9a 100755 --- a/ve/velib04b.cpp +++ b/ve/velib04b.cpp @@ -2627,24 +2627,29 @@ error_type TContabilizzazione::write_scadenze(TDocumento& doc) // const real change(head.get_real(MOV_CAMBIO)); int anno = head.get_int(MOV_ANNOIVA); - TString16 numpart = doc.get(DOC_NUMDOCRIF); if (head.get_real(MOV_TOTDOC) == ZERO) return _error; - if (numpart.full() && _caus->iva() == iva_vendite && !doc.tipo().nota_credito()) - numpart.cut(0); + TString16 numpart; - if (numpart.blank()) - { - numpart = head.get(_nump_cfg ? MOV_PROTIVA : MOV_NUMDOC); - } - else - { - TDate ddr = doc.get_date(DOC_DATADOCRIF); - if (ddr.ok()) - anno = ddr.year(); - } + if (_nump_cfg) + numpart = head.get(MOV_PROTIVA); + else + { + numpart = doc.get(DOC_NUMDOCRIF); + if (_caus->iva() == iva_vendite && !doc.tipo().nota_credito()) + numpart.cut(0); + + if (numpart.blank()) + numpart = head.get(MOV_NUMDOC); + else + { + TDate ddr = doc.get_date(DOC_DATADOCRIF); + if (ddr.ok()) + anno = ddr.year(); + } + } TPartita* newgame = NULL; if (anno > 0 && !numpart.blank())