From 6c25e58911d70ba0c7c3082f82e3efcadbcdcc4e Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Mon, 5 Jun 2023 11:41:19 +0700 Subject: [PATCH] merge development --- CONTRIBUTING.md | 9 + Dockerfile | 61 ++++ data/GrowerpAaSeedData.xml | 12 +- data/GrowerpAaSetupData.xml | 3 + entity/GrowerpViewEntities.xml | 6 + ...lity-location-to-assets-relationship.patch | 25 ++ ...-gl-accounts-and-payroll-simplified-.patch | 54 +++ service/growerp.rest.xml | 9 +- service/growerp/100/AccountingServices100.xml | 333 ++++++++++++++---- service/growerp/100/FinDocServices100.xml | 166 +++++---- service/growerp/100/PartyServices100.xml | 62 +++- service/growerp/100/WarehouseServices100.xml | 3 + 12 files changed, 570 insertions(+), 173 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 Dockerfile create mode 100644 patches/mantle-udm/0001-add-facility-location-to-assets-relationship.patch create mode 100644 patches/mantle-udm/0001-disable-itemType-gl-accounts-and-payroll-simplified-.patch diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e961067 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,9 @@ +# How to contribute. + +In general you can make a pull request to the https://github.com/growerp/growerp repository: + +1. Fork it! +2. Create your feature branch from master/main branch: git checkout -b my-new-feature +3. Commit your changes: git commit -am 'Add some feature' +4. Push to the branch: git push --set-upstream origin my-new-feature +5. Submit a pull request. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b47ac95 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,61 @@ +#stage 1 -get files and build +FROM openjdk:11-jdk as build-env +MAINTAINER Growerp + +ARG BRANCH=development # currently either master or development we need to add existing + +RUN apt-get update && \ + apt-get install -y curl git wget zip unzip apt-transport-https && \ + apt-get clean +#install dart +RUN wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/dart.gpg +RUN echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | tee /etc/apt/sources.list.d/dart_stable.list +RUN apt-get update && apt-get install dart +RUN export PATH="/usr/lib/dart/bin:$PATH" +#install growerp backend +RUN dart pub global activate growerp +ENV PATH="/root/.pub-cache/bin:$PATH" +# will install in /root/growerp/flutterDevelopment +RUN growerp install backend -dev -noBuild +# antwebsystems website +WORKDIR /root/growerp/moquiDevelopment/ +RUN git clone --depth 1 https://github.com/AntWebsystems-Co-Ltd/vueWebsite.git /root/vueWebsite +RUN cp /root/vueWebsite/AWSSetupAaaWebSiteData.xml runtime/component/growerp/service/growerp +RUN cp /root/vueWebsite/WebSiteRestServices.xml runtime/component/growerp/data +# local db for development but need search +RUN echo $BRANCH +RUN if [ "$BRANCH" = "development" ]; then ./gradlew downloadElasticsearch ; fi +# production uses postgresql +RUN if [ "$BRANCH" = "master" ]; then curl -L https://jdbc.postgresql.org/download/postgresql-42.2.9.jar -o /runtime/lib ; fi +RUN ./gradlew addRunTime +# unzip war file +WORKDIR /opt/moqui +RUN unzip -q /root/growerp/moquiDevelopment/moqui-plus-runtime.war + +# stage 2 create image +FROM openjdk:11-jdk +RUN apt-get update && apt-get install -y apt-transport-https nano && apt-get clean +WORKDIR /opt +COPY --from=build-env /opt/moqui . +# exposed as volumes for configuration purposes +VOLUME ["/opt/moqui/runtime/conf", "/opt/moqui/runtime/lib", "/opt/moqui/runtime/classes", "/opt/moqui/runtime/ecomponent"] +# exposed as volumes to persist data outside the container, recommended +VOLUME ["/opt/moqui/runtime/log", "/opt/moqui/runtime/txlog", "/opt/moqui/runtime/sessions", "/opt/moqui/runtime/db", "/opt/moqui/runtime/elasticsearch"] + +# Main Servlet Container Port +EXPOSE 80 +# ElasticSearch HTTP Port +EXPOSE 9200 +# ElasticSearch Cluster (TCP Transport) Port +EXPOSE 9300 +# Hazelcast Cluster Port +EXPOSE 5701 + +# this is to run from the war file directly, preferred approach unzips war file in advance +# ENTRYPOINT ["java", "-jar", "moqui.war"] +ENTRYPOINT ["java", "-cp", ".", "MoquiStart", "port=80"] + +HEALTHCHECK --interval=30s --timeout=600ms --start-period=120s CMD curl -f -H "X-Forwarded-Proto: https" -H "X-Forwarded-Ssl: on" http://localhost/status || exit 1 +# specify this as a default parameter if none are specified with docker exec/run, ie run production by default +CMD ["conf=conf/MoquiProductionConf.xml"] + diff --git a/data/GrowerpAaSeedData.xml b/data/GrowerpAaSeedData.xml index b92a22f..1c529c7 100644 --- a/data/GrowerpAaSeedData.xml +++ b/data/GrowerpAaSeedData.xml @@ -151,12 +151,12 @@ along with this software (see the LICENSE.md file). If not, see - - - - - - + + + + + + diff --git a/data/GrowerpAaSetupData.xml b/data/GrowerpAaSetupData.xml index f9063d7..5273f94 100644 --- a/data/GrowerpAaSetupData.xml +++ b/data/GrowerpAaSetupData.xml @@ -19,4 +19,7 @@ along with this software (see the LICENSE.md file). If not, see serviceName="growerp.100.GeneralServices100.get#Statistics" cronExpression="0 0 * * * ?" paused="N" transactionTimeout="1800"/> + + diff --git a/entity/GrowerpViewEntities.xml b/entity/GrowerpViewEntities.xml index 8cd22b4..7ab1016 100644 --- a/entity/GrowerpViewEntities.xml +++ b/entity/GrowerpViewEntities.xml @@ -259,6 +259,7 @@ along with this software (see the LICENSE.md file). If not, see + @@ -471,6 +472,8 @@ along with this software (see the LICENSE.md file). If not, see + @@ -483,7 +486,10 @@ along with this software (see the LICENSE.md file). If not, see + + + diff --git a/patches/mantle-udm/0001-add-facility-location-to-assets-relationship.patch b/patches/mantle-udm/0001-add-facility-location-to-assets-relationship.patch new file mode 100644 index 0000000..8e4e61a --- /dev/null +++ b/patches/mantle-udm/0001-add-facility-location-to-assets-relationship.patch @@ -0,0 +1,25 @@ +From ba051c56ea3b7ad9de9dd64de7e3eadff5029d8c Mon Sep 17 00:00:00 2001 +From: Hans Bakker +Date: Tue, 14 Dec 2021 09:49:34 +0700 +Subject: [PATCH] add facility location to assets relationship + +--- + entity/FacilityEntities.xml | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/entity/FacilityEntities.xml b/entity/FacilityEntities.xml +index d86a207..b3fb1d8 100644 +--- a/entity/FacilityEntities.xml ++++ b/entity/FacilityEntities.xml +@@ -259,6 +259,8 @@ along with this software (see the LICENSE.md file). If not, see + + + ++ ++ + + + +-- +2.34.1 + diff --git a/patches/mantle-udm/0001-disable-itemType-gl-accounts-and-payroll-simplified-.patch b/patches/mantle-udm/0001-disable-itemType-gl-accounts-and-payroll-simplified-.patch new file mode 100644 index 0000000..534f710 --- /dev/null +++ b/patches/mantle-udm/0001-disable-itemType-gl-accounts-and-payroll-simplified-.patch @@ -0,0 +1,54 @@ +From 7ce84bbb043d22d0d2174058e2c4b5b9fad3dfd7 Mon Sep 17 00:00:00 2001 +From: Hans Bakker +Date: Tue, 8 Jun 2021 05:28:42 +0700 +Subject: [PATCH] disable itemType, gl accounts and payroll: simplified version + provided in growerp-moqui component + +--- + data/ItemTypeData.xml | 2 +- + data/ZaaGlAccountsInstallData.xml | 2 +- + data/ZapPayrollTaxInstallData.xml | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/data/ItemTypeData.xml b/data/ItemTypeData.xml +index 83289e9..35634ee 100644 +--- a/data/ItemTypeData.xml ++++ b/data/ItemTypeData.xml +@@ -12,7 +12,7 @@ You should have received a copy of the CC0 Public Domain Dedication + along with this software (see the LICENSE.md file). If not, see + . + --> +- ++ + + + +diff --git a/data/ZaaGlAccountsInstallData.xml b/data/ZaaGlAccountsInstallData.xml +index bca1f54..4ed054a 100644 +--- a/data/ZaaGlAccountsInstallData.xml ++++ b/data/ZaaGlAccountsInstallData.xml +@@ -12,7 +12,7 @@ You should have received a copy of the CC0 Public Domain Dedication + along with this software (see the LICENSE.md file). If not, see + . + --> +- ++ + + + +diff --git a/data/ZapPayrollTaxInstallData.xml b/data/ZapPayrollTaxInstallData.xml +index 49cba9a..677a948 100644 +--- a/data/ZapPayrollTaxInstallData.xml ++++ b/data/ZapPayrollTaxInstallData.xml +@@ -12,7 +12,7 @@ You should have received a copy of the CC0 Public Domain Dedication + along with this software (see the LICENSE.md file). If not, see + . + --> +- ++ + + - + @@ -37,6 +38,8 @@ along with this software (see the LICENSE.md file). If not, see + + @@ -115,8 +118,12 @@ along with this software (see the LICENSE.md file). If not, see + + + + + + + - - - - - - + - + + + + + + + + + + + + + + + + + + + - + - + - + + + + + + - + + diff --git a/service/growerp/100/FinDocServices100.xml b/service/growerp/100/FinDocServices100.xml index a422cf2..728d89f 100644 --- a/service/growerp/100/FinDocServices100.xml +++ b/service/growerp/100/FinDocServices100.xml @@ -200,11 +200,11 @@ along with this software (see the LICENSE.md file). If not, see - - - - + + + + @@ -261,15 +261,15 @@ along with this software (see the LICENSE.md file). If not, see - - - - - - - - + + + + + + + + @@ -307,6 +307,8 @@ along with this software (see the LICENSE.md file). If not, see + + @@ -449,6 +451,7 @@ along with this software (see the LICENSE.md file). If not, see sales: sales, docType: docType, otherUser: userOut, + otherCompany: company, grandTotal: item.grandTotal ? item.grandTotal.toString(): null, ]"/> @@ -574,6 +577,7 @@ along with this software (see the LICENSE.md file). If not, see creationDate: item.invoiceDate ? item.invoiceDate.toString().substring(0,19) + 'Z' : null, otherUser: userOut, + otherCompany: company, grandTotal: item.invoiceTotal ? item.invoiceTotal.toString() : null, ]"/> @@ -650,7 +654,7 @@ along with this software (see the LICENSE.md file). If not, see - + @@ -704,6 +708,7 @@ along with this software (see the LICENSE.md file). If not, see sales: sales, docType: docType, otherUser: userOut, + otherCompany: company, grandTotal: item.amount ? item.amount.toString() : null, items: items ? items : [], ]"/> @@ -735,7 +740,7 @@ along with this software (see the LICENSE.md file). If not, see - + @@ -806,12 +811,14 @@ along with this software (see the LICENSE.md file). If not, see @@ -835,8 +842,7 @@ along with this software (see the LICENSE.md file). If not, see creationDate: item.entryDate ? item.entryDate.toString().substring(0,19) + 'Z' : null, otherUser: userOut, - telephoneNr: item.telephoneNr, - address: address, + otherCompany: company, ]"/> @@ -923,6 +929,8 @@ along with this software (see the LICENSE.md file). If not, see creationDate: item.transactionDate ? item.transactionDate.toString().substring(0,19) + 'Z' : null, otherUser: userOut, + otherCompany: company, + grandTotal: item.amount ? item.amount.toString(): null, ]"/> @@ -931,8 +939,14 @@ along with this software (see the LICENSE.md file). If not, see price: item.debitCreditFlag == 'D' ? item.amount.toString() : (item.amount * -1).toString(), itemType: [itemTypeId: item.typeId], - glAccountId: item.glAccountId, + glAccount: [ + glAccountId: item.glAccountId, + accountCode: accountCodeFormatter + ? accountCodeFormatter.valueToString(item.accountCode) + : item.accountCode, + accountName: item.accountName], productId: item.productId, + description: item.description, ]"/> @@ -960,11 +974,11 @@ along with this software (see the LICENSE.md file). If not, see - - - - - + + + + + @@ -1019,24 +1033,24 @@ along with this software (see the LICENSE.md file). If not, see - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -1067,8 +1081,8 @@ along with this software (see the LICENSE.md file). If not, see - - + + @@ -1107,11 +1121,11 @@ along with this software (see the LICENSE.md file). If not, see name="growerp.100.GeneralServices100.get#RelatedCompanyAndOwner"/> - + - + @@ -1174,12 +1188,12 @@ along with this software (see the LICENSE.md file). If not, see name="growerp.100.GeneralServices100.get#RelatedCompanyAndOwner"/> - - + + - - + + @@ -1230,18 +1244,18 @@ along with this software (see the LICENSE.md file). If not, see name="growerp.100.GeneralServices100.get#RelatedCompanyAndOwner"/> - + - + payment.otherCompany.paymentMethod?.ccPaymentMethodId"> + - + @@ -1375,12 +1389,12 @@ along with this software (see the LICENSE.md file). If not, see - - - - - - + + + + + + @@ -1419,7 +1433,7 @@ along with this software (see the LICENSE.md file). If not, see - + @@ -1433,13 +1447,13 @@ along with this software (see the LICENSE.md file). If not, see - - - - - - + + + + + + @@ -1698,12 +1712,12 @@ along with this software (see the LICENSE.md file). If not, see - + - + - + @@ -1775,7 +1789,7 @@ along with this software (see the LICENSE.md file). If not, see @@ -1886,12 +1900,12 @@ along with this software (see the LICENSE.md file). If not, see - + invoice.otherCompany.partyId != items[0].toPartyId"> + - + invoice.otherCompany.partyId != items[0].fromPartyId"> + @@ -1936,10 +1950,10 @@ along with this software (see the LICENSE.md file). If not, see - + - + @@ -1970,7 +1984,7 @@ along with this software (see the LICENSE.md file). If not, see + from="payment.otherCompany.paymentMethod.ccPaymentMethodId"/> diff --git a/service/growerp/100/PartyServices100.xml b/service/growerp/100/PartyServices100.xml index ce3c1af..e5653d1 100644 --- a/service/growerp/100/PartyServices100.xml +++ b/service/growerp/100/PartyServices100.xml @@ -14,6 +14,38 @@ along with this software (see the LICENSE.md file). If not, see --> + + Check if a particular emaill address exists of a party + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Check if a particular company (irrespective of owner) exists @@ -1289,6 +1321,8 @@ along with this software (see the LICENSE.md file). If not, see + @@ -1829,7 +1863,8 @@ along with this software (see the LICENSE.md file). If not, see @@ -1922,15 +1957,6 @@ along with this software (see the LICENSE.md file). If not, see ownerPartyId: companyPartyId, facilityName: company.organizationName + ' Inventory']" out-map="context"/> - - - - - - - - @@ -2206,6 +2232,7 @@ along with this software (see the LICENSE.md file). If not, see + @@ -2221,6 +2248,15 @@ along with this software (see the LICENSE.md file). If not, see + + + + + + + + @@ -2657,11 +2693,11 @@ along with this software (see the LICENSE.md file). If not, see - + - + @@ -2683,7 +2719,7 @@ along with this software (see the LICENSE.md file). If not, see ]" out-map="context"/> diff --git a/service/growerp/100/WarehouseServices100.xml b/service/growerp/100/WarehouseServices100.xml index 87c7224..eadc1cf 100644 --- a/service/growerp/100/WarehouseServices100.xml +++ b/service/growerp/100/WarehouseServices100.xml @@ -87,6 +87,8 @@ along with this software (see the LICENSE.md file). If not, see operator="like" from="search" ignore-if-empty="true"/> + @@ -114,6 +116,7 @@ along with this software (see the LICENSE.md file). If not, see pseudoId: loc.pseudoId, productName: loc.productName]"/>