Skip to content

Commit

Permalink
Merge Changes from feature/3.9.4 Branch
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosaparadam committed Oct 30, 2023
1 parent 9f0a5d7 commit 8641353
Show file tree
Hide file tree
Showing 57 changed files with 158 additions and 216 deletions.
4 changes: 1 addition & 3 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry combineaccessrules="false" kind="src" path="/Withholding-Engine"/>
<classpathentry combineaccessrules="false" kind="src" path="/adempiereFork"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
18 changes: 2 additions & 16 deletions .github/workflows/build_with_gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,11 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v2

- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt-hotspot'
java-version: 8

- name: get adempiere source
run: |
download_repo="https://github.com/erpcya/adempiere/releases/download/3.9.3-rs-4.3/Adempiere_393LTS.tar.gz"
wget $download_repo -c -O Adempiere.tar.gz
- name: uncompress file
run: tar -xzf Adempiere.tar.gz
- name: create dependences folder
run: mkdir dependences
- name: move dependences
run: mv Adempiere/lib/*.jar dependences/
- name: move packages
run: mv Adempiere/packages/*/lib/*.jar dependences/
java-version: 11

- name: Build with Gradle
run: gradle build
Expand Down
19 changes: 3 additions & 16 deletions .github/workflows/publish_with_gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,17 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v2

- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt-hotspot'
java-version: 8

- name: get adempiere source
run: |
download_repo="https://github.com/erpcya/adempiere/releases/download/3.9.3-rs-4.3/Adempiere_393LTS.tar.gz"
wget $download_repo -c -O Adempiere.tar.gz
- name: uncompress file
run: tar -xzf Adempiere.tar.gz
- name: create dependences folder
run: mkdir dependences
- name: move dependences
run: mv Adempiere/lib/*.jar dependences/
- name: move packages
run: mv Adempiere/packages/*/lib/*.jar dependences/
java-version: 11

- name: Publish with Gradle
run: gradle publish
env:
ADEMPIERE_LIBRARY_VERSION: ${{ github.event.release.tag_name }}
ADEMPIERE_LIBRARY_GROUP: ${{ secrets.ADEMPIERE_LIBRARY_GROUP }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand All @@ -12,4 +12,4 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.source=11
34 changes: 23 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,38 @@ apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenLocal()
mavenCentral()
}

if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
allprojects {
tasks.withType(Javadoc).all { enabled = false }
}

sourceCompatibility = 1.11
targetCompatibility = 1.11

def baseVersion = '3.9.4'
def baseGroupId = 'io.github.adempiere'
def customGroupId = System.getenv("ADEMPIERE_LIBRARY_GROUP")

dependencies {
api 'io.github.adempiere:withholding-engine:1.2.9'
compileOnly fileTree(dir: 'dependences', include: ['*.jar'])
compileOnly fileTree(dir: 'lib', include: ['*.jar'])
implementation fileTree(
dir: 'lib',
include: [
'*.jar'
]
)
// ADempiere Core
implementation "${baseGroupId}:human-resource-and-payroll:${baseVersion}"
implementation "${baseGroupId}:store:${baseVersion}"
// https://search.maven.org/artifact/javax.mail/javax.mail-api/1.6.2/jar
implementation 'javax.mail:javax.mail-api:1.6.2'
// http://xml.apache.org/commons/#external
implementation 'xml-apis:xml-apis:2.0.2'
implementation "${baseGroupId}:withholding-engine:adempiere-3.9.4-1.3.2"
}

sourceSets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.compiere.model.CalloutEngine;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.model.I_C_BPartner;
import org.adempiere.core.domains.models.I_C_BPartner;

/**
* Class added from standard values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.model.*;
import org.compiere.model.MTable;
import org.compiere.util.KeyNamePair;

/** Generated Interface for LVE_AutoDebitNoteSetting
Expand Down Expand Up @@ -76,7 +76,7 @@ public interface I_LVE_AutoDebitNoteSetting
*/
public int getC_DocType_ID();

public org.compiere.model.I_C_DocType getC_DocType() throws RuntimeException;
public org.adempiere.core.domains.models.I_C_DocType getC_DocType() throws RuntimeException;

/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
Expand Down Expand Up @@ -116,7 +116,7 @@ public interface I_LVE_AutoDebitNoteSetting
/** Get Allocation Charge */
public int getLVE_AllocationCharge_ID();

public org.compiere.model.I_C_Charge getLVE_AllocationCharge() throws RuntimeException;
public org.adempiere.core.domains.models.I_C_Charge getLVE_AllocationCharge() throws RuntimeException;

/** Column name LVE_AllocationDocType_ID */
public static final String COLUMNNAME_LVE_AllocationDocType_ID = "LVE_AllocationDocType_ID";
Expand All @@ -127,7 +127,7 @@ public interface I_LVE_AutoDebitNoteSetting
/** Get Allocation Document Type */
public int getLVE_AllocationDocType_ID();

public org.compiere.model.I_C_DocType getLVE_AllocationDocType() throws RuntimeException;
public org.adempiere.core.domains.models.I_C_DocType getLVE_AllocationDocType() throws RuntimeException;

/** Column name LVE_AutoDebitNoteSetting_ID */
public static final String COLUMNNAME_LVE_AutoDebitNoteSetting_ID = "LVE_AutoDebitNoteSetting_ID";
Expand All @@ -147,7 +147,7 @@ public interface I_LVE_AutoDebitNoteSetting
/** Get Debit Note Charge */
public int getLVE_DebitNoteCharge_ID();

public org.compiere.model.I_C_Charge getLVE_DebitNoteCharge() throws RuntimeException;
public org.adempiere.core.domains.models.I_C_Charge getLVE_DebitNoteCharge() throws RuntimeException;

/** Column name LVE_DebitNoteDocType_ID */
public static final String COLUMNNAME_LVE_DebitNoteDocType_ID = "LVE_DebitNoteDocType_ID";
Expand All @@ -158,7 +158,7 @@ public interface I_LVE_AutoDebitNoteSetting
/** Get Debit Note Document Type */
public int getLVE_DebitNoteDocType_ID();

public org.compiere.model.I_C_DocType getLVE_DebitNoteDocType() throws RuntimeException;
public org.adempiere.core.domains.models.I_C_DocType getLVE_DebitNoteDocType() throws RuntimeException;

/** Column name LVE_IsCopyLinesFromInvoice */
public static final String COLUMNNAME_LVE_IsCopyLinesFromInvoice = "LVE_IsCopyLinesFromInvoice";
Expand All @@ -182,7 +182,7 @@ public interface I_LVE_AutoDebitNoteSetting
*/
public int getM_PriceList_ID();

public org.compiere.model.I_M_PriceList getM_PriceList() throws RuntimeException;
public org.adempiere.core.domains.models.I_M_PriceList getM_PriceList() throws RuntimeException;

/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public interface I_LVE_CashTax
*/
public int getC_Cash_ID();

public org.compiere.model.I_C_Cash getC_Cash() throws RuntimeException;
public org.adempiere.core.domains.models.I_C_Cash getC_Cash() throws RuntimeException;

/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
Expand Down Expand Up @@ -107,7 +107,7 @@ public interface I_LVE_CashTax
*/
public int getC_Tax_ID();

public org.compiere.model.I_C_Tax getC_Tax() throws RuntimeException;
public org.adempiere.core.domains.models.I_C_Tax getC_Tax() throws RuntimeException;

/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
Expand Down
14 changes: 7 additions & 7 deletions core/src/main/java/base/org/erpya/lve/model/LVE.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
import java.util.Optional;

import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.I_C_BPartner;
import org.compiere.model.I_C_Invoice;
import org.compiere.model.I_C_Order;
import org.compiere.model.I_I_BPartner;
import org.compiere.model.I_I_Invoice;
import org.compiere.model.I_M_InOut;
import org.adempiere.core.domains.models.I_C_BPartner;
import org.adempiere.core.domains.models.I_C_Invoice;
import org.adempiere.core.domains.models.I_C_Order;
import org.adempiere.core.domains.models.I_I_BPartner;
import org.adempiere.core.domains.models.I_I_Invoice;
import org.adempiere.core.domains.models.I_M_InOut;
import org.compiere.model.MBPartner;
import org.compiere.model.MClient;
import org.compiere.model.MDocType;
Expand All @@ -50,8 +50,8 @@
import org.compiere.util.Util;
import org.erpya.lve.util.AllocationManager;
import org.erpya.lve.util.LVEUtil;
import org.erpya.lve.util.DocumentTypeSequence;
import org.spin.model.MWHWithholding;
import org.erpya.lve.util.DocumentTypeSequence;

/**
* Add Default Model Validator for Location Venezuela
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/base/org/erpya/lve/model/LVEImport.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import org.compiere.model.MInvoice;
import org.compiere.model.MInvoiceLine;
import org.compiere.model.Query;
import org.compiere.model.X_I_BPartner;
import org.compiere.model.X_I_Invoice;
import org.adempiere.core.domains.models.X_I_BPartner;
import org.adempiere.core.domains.models.X_I_Invoice;
import org.compiere.process.ImportBPartner;
import org.compiere.process.ImportInvoice;
import org.compiere.util.CLogger;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/base/org/erpya/lve/model/MLVEList.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static MLVEList get (Properties ctx, int listId) {
if (listId <= 0) {
return null;
}
Integer key = new Integer (listId);
Integer key = Integer.valueOf(listId);
MLVEList retValue = (MLVEList) cache.get (key);
if (retValue != null) {
return retValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static MLVEListLine get (Properties ctx, int listId) {
if (listId <= 0) {
return null;
}
Integer key = new Integer (listId);
Integer key = Integer.valueOf(listId);
MLVEListLine retValue = (MLVEListLine) cache.get (key);
if (retValue != null) {
return retValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static MLVEListType get (Properties ctx, int listId) {
if (listId <= 0) {
return null;
}
Integer key = new Integer (listId);
Integer key = Integer.valueOf(listId);
MLVEListType retValue = (MLVEListType) cache.get (key);
if (retValue != null) {
return retValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import java.util.Arrays;

import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.I_C_Invoice;
import org.compiere.model.I_C_InvoiceLine;
import org.adempiere.core.domains.models.I_C_Invoice;
import org.adempiere.core.domains.models.I_C_InvoiceLine;
import org.compiere.model.MClient;
import org.compiere.model.MCurrency;
import org.compiere.model.MDocType;
Expand Down
9 changes: 5 additions & 4 deletions core/src/main/java/base/org/erpya/lve/model/TaxDiscount.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
package org.erpya.lve.model;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import org.compiere.model.I_C_Invoice;
import org.compiere.model.I_C_Order;
import org.adempiere.core.domains.models.I_C_Invoice;
import org.adempiere.core.domains.models.I_C_Order;
import org.compiere.model.MClient;
import org.compiere.model.MInvoice;
import org.compiere.model.MInvoiceLine;
Expand Down Expand Up @@ -377,8 +378,8 @@ private int getDiscountTaxId(String trxName, int taxCategoryId, Timestamp dateDo
continue;
}
// For rate
if(!tax.getRate().setScale(2, BigDecimal.ROUND_HALF_UP)
.equals(taxToApply.setScale(2, BigDecimal.ROUND_HALF_UP))) {
if(!tax.getRate().setScale(2, RoundingMode.HALF_UP)
.equals(taxToApply.setScale(2, RoundingMode.HALF_UP))) {
continue;
}
// Get it
Expand Down
Loading

0 comments on commit 8641353

Please sign in to comment.