Skip to content

Commit

Permalink
Gestite nel modello intra12, le fatture di san marino come extra ue
Browse files Browse the repository at this point in the history
  • Loading branch information
rpucciarelli committed Dec 18, 2012
1 parent 03c14f1 commit d89d122
Showing 1 changed file with 14 additions and 9 deletions.
Expand Up @@ -790,6 +790,8 @@ public void doElaboraFile(ActionContext context, VIntra12Bulk dett)throws Busine

BigDecimal totImpS30Extra=new BigDecimal("0");

BigDecimal totImpBeniExtra=new BigDecimal("0");
BigDecimal totIvaBeniExtra=new BigDecimal("0");

for (Iterator i = lista.iterator(); i.hasNext();) {
VIntra12Bulk d=(VIntra12Bulk)i.next();
Expand Down Expand Up @@ -819,7 +821,10 @@ else if(d.getCdBeneServizio().compareTo("S030")==0) {
}else if (d.getCdBeneServizio().compareTo("BENI")!=0){
totImpServExtra=totImpServExtra.add(d.getImponibile());
totIvaServExtra=totIvaServExtra.add(d.getIva());
}
} else if(d.getCdBeneServizio().compareTo("BENI")==0){
totImpBeniExtra=totImpBeniExtra.add(d.getImponibile());
totIvaBeniExtra=totIvaBeniExtra.add(d.getIva());
}
}
}
// Tipo Record A Testata
Expand Down Expand Up @@ -969,7 +974,7 @@ else if(d.getCdBeneServizio().compareTo("S030")==0) {
if(BigDecimal.ZERO.compareTo(BigDecimal.ZERO)!=0){
bw.append("TR012004");// Iva Beni soggetti stabiliti in altri stati comunita (beni assemblati in Italia)
bw.append(Formatta(BigDecimal.ZERO.toString(),"D",16," "));
num_col++;
num_col++;
}
if(totImpServIntra.compareTo(BigDecimal.ZERO)!=0){
bw.append("TR012005");
Expand All @@ -986,14 +991,14 @@ else if(d.getCdBeneServizio().compareTo("S030")==0) {
bw.append(Formatta(totIvaServIntra.setScale(2, java.math.BigDecimal.ROUND_HALF_UP).toString().replace(".", ","),"D",16," "));
num_col++;
}
if(BigDecimal.ZERO.compareTo(BigDecimal.ZERO)!=0){
bw.append("TR012008");// Bolle doganali ignorare imponibile
bw.append(Formatta(BigDecimal.ZERO.toString(),"D",16," "));
if(totImpBeniExtra.compareTo(BigDecimal.ZERO)!=0){
bw.append("TR012008");// Bolle doganali ignorare imponibile - considerato beni san marino
bw.append(Formatta(totImpBeniExtra.setScale(2, java.math.BigDecimal.ROUND_HALF_UP).toString().replace(".", ","),"D",16," "));
num_col++;
}
if(BigDecimal.ZERO.compareTo(BigDecimal.ZERO)!=0){
if(totIvaBeniExtra.compareTo(BigDecimal.ZERO)!=0){
bw.append("TR012009");// Bolle doganali ignorare iva
bw.append(Formatta(BigDecimal.ZERO.toString(),"D",16," "));
bw.append(Formatta(totIvaBeniExtra.setScale(2, java.math.BigDecimal.ROUND_HALF_UP).toString().replace(".", ","),"D",16," "));
num_col++;
}
if(totImpServExtra.compareTo(BigDecimal.ZERO)!=0){
Expand All @@ -1013,9 +1018,9 @@ else if(d.getCdBeneServizio().compareTo("S030")==0) {
bw.append(Formatta(totIvaServExtra.setScale(2, java.math.BigDecimal.ROUND_HALF_UP).toString().replace(".", ","),"D",16," "));
num_col++;
}
if((totIvaServExtra.add(totIvaServIntra).add(totIvaBeniIntra)).compareTo(BigDecimal.ZERO)!=0){
if((totIvaServExtra.add(totIvaServIntra).add(totIvaBeniIntra).add(totIvaBeniExtra)).compareTo(BigDecimal.ZERO)!=0){
bw.append("TR012013");
bw.append(Formatta((((totIvaServExtra.add(totIvaServIntra).add(totIvaBeniIntra)).setScale(2, java.math.BigDecimal.ROUND_HALF_UP)).toString().replace(".", ",")),"D",16," "));
bw.append(Formatta((((totIvaServExtra.add(totIvaServIntra).add(totIvaBeniIntra).add(totIvaBeniExtra)).setScale(2, java.math.BigDecimal.ROUND_HALF_UP)).toString().replace(".", ",")),"D",16," "));
num_col++;
}
// Campi non posizionali
Expand Down

0 comments on commit d89d122

Please sign in to comment.