From mallon@users.chorem.org Wed Aug 22 13:05:08 2012 From: mallon@users.chorem.org To: lima-commits@list.chorem.org Subject: [Lima-commits] r3628 - trunk/lima-business/src/main/java/org/chorem/lima/business/ejb Date: Wed, 22 Aug 2012 13:05:08 +0200 Message-ID: <20120822110508.01F695ACE0@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0468702716787981997==" --===============0468702716787981997== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: mallon Date: 2012-08-22 13:05:07 +0200 (Wed, 22 Aug 2012) New Revision: 3628 Url: http://chorem.org/repositories/revision/lima/3628 Log: refs #769 Correction sur l edition du grand livre et les sous-tableaux des en= trees. Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentSer= viceImpl.java Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/Docu= mentServiceImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentSe= rviceImpl.java 2012-08-22 10:06:55 UTC (rev 3627) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentSe= rviceImpl.java 2012-08-22 11:05:07 UTC (rev 3628) @@ -328,76 +328,6 @@ BigDecimal currentAmountCredit =3D new BigDecimal(0); String accountcarry =3D ""; =20 - /*ledgerReport +=3D "" + - " " + - "" + - "" + - "" + - "
" + - "\n" + - "\n"; - - String boldItalicBegin =3D "" + ""; - String boldItalicEnd =3D "" + ""; - Identity identity =3D identityService.getIdentity(); - - String [] columnsNameSociety =3D {boldItalicBegin + iden= tity.getName()+ boldItalicEnd}; - ledgerReport +=3D constructColumnsHtml(columnsNameSociet= y, ""); - - ledgerReport +=3D "\n"; - String [] columnsDescription =3D {"" + identity.getDe= scription()+ ""}; - ledgerReport +=3D constructColumnsHtml(columnsDescriptio= n, ""); - - ledgerReport +=3D "\n"; - String [] columnsAdressOne =3D {"" + identity.getAddr= ess() + ""}; - ledgerReport +=3D constructColumnsHtml(columnsAdressOne,= ""); - - ledgerReport +=3D "\n"; - String [] columnsAdressTwo =3D {"" + identity.getAddr= ess2() + ""}; - ledgerReport +=3D constructColumnsHtml(columnsAdressTwo,= ""); - - ledgerReport +=3D "\n"; - String [] columnsZipCode =3D {"" + identity.getZipCod= e() + ""}; - ledgerReport +=3D constructColumnsHtml(columnsZipCode, "= "); - - ledgerReport +=3D "\n"; - String [] columnsCity =3D {"" + identity.getCity()+ "= "}; - ledgerReport +=3D constructColumnsHtml(columnsCity, ""); - - ledgerReport +=3D "
\n" + - "
" + - "

" + _("lima-busi= ness.document.ledger") + "

" + - "
" + - "\n"; - - ledgerReport +=3D "\n"; - String [] columnsBusinessNumber =3D {boldItalicBegin + _= ("lima-business.document.businessnumber") + - boldItalicEnd, "" + identity.getBusinessNumbe= r()+ ""}; - ledgerReport +=3D constructColumnsHtml(columnsBusinessNu= mber, ""); - - ledgerReport +=3D "\n"; - String [] columnsClassifCode =3D {boldItalicBegin + _("l= ima-business.document.classificationcode") + - boldItalicEnd, "" + identity.getClassificatio= nCode()+ ""}; - ledgerReport +=3D constructColumnsHtml(columnsClassifCod= e, ""); - - ledgerReport +=3D "\n"; - String [] columnsVatNumber =3D {boldItalicBegin + _("lim= a-business.document.vatnumber") + boldItalicEnd, - "" + identity.getVatNumber()+ "", }; - ledgerReport +=3D constructColumnsHtml(columnsVatNumber,= ""); - - ledgerReport +=3D "\n"; - String [] columnsPeriodOne =3D {boldItalicBegin + _("lim= a-business.document.period1") + boldItalicEnd, "" - + _("lima-business.document.period1format", begi= nDate)+ ""}; - ledgerReport +=3D constructColumnsHtml(columnsPeriodOne,= ""); - - ledgerReport +=3D "\n"; - String [] columnsPeriodTwo =3D {boldItalicBegin + _("lim= a-business.document.period2") + boldItalicEnd, "" - + _("lima-business.document.period2format", endD= ate)+ ""}; - ledgerReport +=3D constructColumnsHtml(columnsPeriodTwo,= ""); - - ledgerReport +=3D "
" + - "
";*/ - List subList =3D list.subList(i, j); =20 =20 @@ -416,9 +346,15 @@ boldBegin + _("lima-business.document.credit") += boldEnd, boldBegin + _("lima-business.document.solde") + boldEnd}; ledgerReport +=3D constructColumnsHtml(columnsNames, ""); =20 + int indexEntry =3D -1; for (Object object : subList) { if (object instanceof ReportsDatas) { - + if (indexEntry !=3D -1) { + indexEntry =3D -1; + ledgerReport +=3D "" + + "" + + ""; + } ReportsDatas reportsDatas =3D (ReportsDatas) obj= ect; =20 String accountS =3D ""; @@ -435,6 +371,7 @@ ledgerReport +=3D constructColumnsHtml(columnsTa= ble, ""); =20 } else { + indexEntry++; Entry entry =3D (Entry) object; =20 String entryBookCode =3D ""; @@ -450,21 +387,22 @@ amountCredit =3D entry.getAmount(); } =20 - ledgerReport +=3D""; - ledgerReport +=3D "\n" + + ledgerReport +=3D""; + if (indexEntry =3D=3D 0) { + ledgerReport +=3D ""; + ledgerReport +=3D ""; } } =20 @@ -1024,7 +962,7 @@ List entries =3D results.getListEntry(); =20 String[] columnNames =3D {_("lima.table.number"), _("lima.ta= ble.date"), _("lima.table.entrybook"), - _("lima.table.voucher"), _("lima.tab= le.decription"), _("lima.table.letter"), + _("lima.table.voucher"), _("lima.tab= le.description"), _("lima.table.letter"), _("lima.table.debit"), _("lima.table= .credit")}; =20 accountReport +=3D "\n" + --===============0468702716787981997==--
\n" + "\n"; - String [] columnsEntry =3D {boldBegin + _("lima-= business.document.date")+ boldEnd, - boldBegin + _("lima-business.document.en= trybook") + boldEnd, boldBegin + _("lima-business.document.voucher") + boldEn= d, - boldBegin + _("lima-business.document.de= scription") + boldEnd, boldBegin + _("lima-business.document.debit") + boldEn= d, - boldBegin + _("lima-business.document.cr= edit") + boldEnd, boldBegin + _("lima-business.document.solde") + boldEnd}; - ledgerReport +=3D constructColumnsHtml(columnsEn= try, ""); + String [] columnsEntry =3D {boldBegin + _("l= ima-business.document.date")+ boldEnd, + boldBegin + _("lima-business.documen= t.entrybook") + boldEnd, boldBegin + _("lima-business.document.voucher") + bo= ldEnd, + boldBegin + _("lima-business.documen= t.description") + boldEnd, boldBegin + _("lima-business.document.debit") + bo= ldEnd, + boldBegin + _("lima-business.documen= t.credit") + boldEnd, boldBegin + _("lima-business.document.solde") + boldEnd= }; + ledgerReport +=3D constructColumnsHtml(colum= nsEntry, ""); + } =20 String [] columnsTable =3D {_("lima-business.doc= ument.dateformat",entry.getFinancialTransaction().getTransactionDate()), entryBookCode, entry.getVoucher(), entry= .getDescription(), amountDebit.toString(), amountCredit.toS= tring(), amountDebit.subtract(amountCredit).toString()}; ledgerReport +=3D constructColumnsHtml(columnsTa= ble, ""); - ledgerReport +=3D "
" + - "