From f323eb44943cf5ad409b5e75d008892d4a3a5c2a Mon Sep 17 00:00:00 2001 From: Yamel Senih Date: Wed, 2 Nov 2022 11:22:24 -0400 Subject: [PATCH] Se corrige problema con espacios en blanco para nombres de proveedores en TXT de Bancaribe --- .../org/erpya/lve/bank/exp/BancaribePagoDetallado_2022.java | 5 ++++- .../java/base/org/erpya/lve/bank/exp/Bancaribe_2022.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/financial/src/main/java/base/org/erpya/lve/bank/exp/BancaribePagoDetallado_2022.java b/financial/src/main/java/base/org/erpya/lve/bank/exp/BancaribePagoDetallado_2022.java index 40bdee2..2031b07 100644 --- a/financial/src/main/java/base/org/erpya/lve/bank/exp/BancaribePagoDetallado_2022.java +++ b/financial/src/main/java/base/org/erpya/lve/bank/exp/BancaribePagoDetallado_2022.java @@ -89,7 +89,10 @@ public int exportToFile(List checks, File file, StringBuffer // Process Account Name String businessPartnerName = processValue(businessPartnerAccount.getA_Name()); if(Optional.ofNullable(businessPartnerName).isPresent()) { - businessPartnerName = rightPadding(businessPartnerName, 64, "", false); + businessPartnerName = businessPartnerName.trim(); + if(businessPartnerName.length() > 64) { + businessPartnerName = businessPartnerName.substring(0, 64); + } } else { addError(Msg.parseTranslation(Env.getCtx(), "@A_Name@ @NotFound@: " + businessPartner.getValue() + " - " + businessPartner.getName())); } diff --git a/financial/src/main/java/base/org/erpya/lve/bank/exp/Bancaribe_2022.java b/financial/src/main/java/base/org/erpya/lve/bank/exp/Bancaribe_2022.java index fb329bf..906d0c3 100644 --- a/financial/src/main/java/base/org/erpya/lve/bank/exp/Bancaribe_2022.java +++ b/financial/src/main/java/base/org/erpya/lve/bank/exp/Bancaribe_2022.java @@ -90,7 +90,10 @@ public int exportToFile(List checks, File file, StringBuffer // Process Account Name String businessPartnerName = processValue(businessPartnerAccount.getA_Name()); if(Optional.ofNullable(businessPartnerName).isPresent()) { - businessPartnerName = rightPadding(businessPartnerName, 64, "", false); + businessPartnerName = businessPartnerName.trim(); + if(businessPartnerName.length() > 64) { + businessPartnerName = businessPartnerName.substring(0, 64); + } } else { addError(Msg.parseTranslation(Env.getCtx(), "@A_Name@ @NotFound@: " + businessPartner.getValue() + " - " + businessPartner.getName())); }