Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
merge development
Browse files Browse the repository at this point in the history
  • Loading branch information
hansbak committed Jun 5, 2023
1 parent 8afe696 commit 6c25e58
Show file tree
Hide file tree
Showing 12 changed files with 570 additions and 173 deletions.
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
61 changes: 61 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#stage 1 -get files and build
FROM openjdk:11-jdk as build-env
MAINTAINER Growerp <support@growerp.com>

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"]

12 changes: 6 additions & 6 deletions data/GrowerpAaSeedData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ along with this software (see the LICENSE.md file). If not, see

<mantle.facility.Facility facilityId="DEFAULT_WH" facilityTypeEnumId="FcTpWarehouse" assetAllowIssueOverQoh="Y"
ownerPartyId="_NA_" facilityName="Default Warehouse">
<locations locationTypeEnumId="FltPick" locationSeqId="0001" sequenceNum="1" areaId="01" aisleId="01" sectionId="01" levelId="01" positionId=""/>
<locations locationTypeEnumId="FltPick" locationSeqId="0002" sequenceNum="2" areaId="01" aisleId="01" sectionId="01" levelId="01" positionId=""/>
<locations locationTypeEnumId="FltPick" locationSeqId="0003" sequenceNum="3" areaId="01" aisleId="01" sectionId="01" levelId="01" positionId=""/>
<locations locationTypeEnumId="FltPick" locationSeqId="0004" sequenceNum="4" areaId="01" aisleId="01" sectionId="01" levelId="01" positionId=""/>
<locations locationTypeEnumId="FltPick" locationSeqId="0005" sequenceNum="5" areaId="01" aisleId="01" sectionId="01" levelId="01" positionId=""/>
<locations locationTypeEnumId="FltPick" locationSeqId="0006" sequenceNum="6" areaId="01" aisleId="01" sectionId="01" levelId="01" positionId=""/>
<locations locationTypeEnumId="FltPick" description="loc 1" locationSeqId="0001" sequenceNum="1" areaId="01" aisleId="01" sectionId="01" levelId="01" positionId="A"/>
<locations locationTypeEnumId="FltPick" description="loc 2" locationSeqId="0002" sequenceNum="2" areaId="02" aisleId="01" sectionId="01" levelId="01" positionId="B"/>
<locations locationTypeEnumId="FltPick" description="loc 3" locationSeqId="0003" sequenceNum="3" areaId="03" aisleId="01" sectionId="01" levelId="01" positionId="C"/>
<locations locationTypeEnumId="FltPick" description="loc 4" locationSeqId="0004" sequenceNum="4" areaId="04" aisleId="01" sectionId="01" levelId="01" positionId="D"/>
<locations locationTypeEnumId="FltPick" description="loc 5" locationSeqId="0005" sequenceNum="5" areaId="05" aisleId="01" sectionId="01" levelId="01" positionId="E"/>
<locations locationTypeEnumId="FltPick" description="loc 6" locationSeqId="0006" sequenceNum="6" areaId="06" aisleId="01" sectionId="01" levelId="01" positionId="F"/>
</mantle.facility.Facility>

<!-- Product for eCommerce Search -->
Expand Down
3 changes: 3 additions & 0 deletions data/GrowerpAaSetupData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>

<!-- format time period name -->
<moqui.basic.LocalizedMessage locale="default" original="TimePeriodBaseNameTemplate"
localized="Y${fromLocalDate.getYear()}${timePeriodType?.lengthUomId!='TF_yr'?(timePeriodType.description.split('(?=[A-Z])')[1][0].toLowerCase())+(periodNum as String).padLeft(2,'0'):''}"/>
</entity-facade-xml>
6 changes: 6 additions & 0 deletions entity/GrowerpViewEntities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ along with this software (see the LICENSE.md file). If not, see
<alias name="assetClassId" field="classEnumId" entity-alias="AST"/>
<alias name="statusId" entity-alias="AST"/>
<alias name="receivedDate" entity-alias="AST"/>
<alias name="acquireCost" entity-alias="AST"/>
<alias name="originalQuantity" entity-alias="AST"/>
<alias name="quantityOnHand" field="quantityOnHandTotal" entity-alias="AST"/>
<alias name="availableToPromise" field="availableToPromiseTotal" entity-alias="AST"/>
Expand Down Expand Up @@ -471,6 +472,8 @@ along with this software (see the LICENSE.md file). If not, see
<member-entity entity-alias="CORG" entity-name="mantle.party.Organization"
join-from-alias="ATX" join-optional="true">
<key-map field-name="otherPartyId" related="partyId"/></member-entity>
<member-entity entity-alias="GLAC" entity-name="mantle.ledger.account.GlAccount"
join-from-alias="ATE"><key-map field-name="glAccountId"/></member-entity>
<alias name="transactionId" field="acctgTransId" entity-alias="ATX"/>
<alias name="invoiceId" entity-alias="ATX"/>
<alias name="paymentId" entity-alias="ATX"/>
Expand All @@ -483,7 +486,10 @@ along with this software (see the LICENSE.md file). If not, see
<alias name="entryId" field="acctgTransEntrySeqId" entity-alias="ATE"/>
<alias name="debitCreditFlag" entity-alias="ATE"/>
<alias name="productId" entity-alias="ATE"/>
<alias name="description" entity-alias="ATE"/>
<alias name="glAccountId" entity-alias="ATE"/>
<alias name="accountCode" entity-alias="GLAC"/>
<alias name="accountName" entity-alias="GLAC"/>
<alias name="amount" entity-alias="ATE"/>
<alias name="otherCompanyPartyId" field="partyId" entity-alias="CORG"/>
<alias name="otherCompanyName" field="organizationName" entity-alias="CORG"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From ba051c56ea3b7ad9de9dd64de7e3eadff5029d8c Mon Sep 17 00:00:00 2001
From: Hans Bakker <h.bakker@antwebsystems.com>
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
<relationship type="one" related="moqui.basic.GeoPoint" short-alias="geoPoint"/>
<relationship type="one" title="Capacity" related="moqui.basic.Uom" short-alias="capacityUom">
<key-map field-name="capacityUomId"/></relationship>
+ <relationship type="many" related="mantle.product.asset.Asset" short-alias="AssetLocation">
+ <key-map field-name="facilityId"/><key-map field-name="locationSeqId"/></relationship>
<seed-data>
<!-- Facility Location Type -->
<moqui.basic.EnumerationType description="Facility Location Type" enumTypeId="FacilityLocationType"/>
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From 7ce84bbb043d22d0d2174058e2c4b5b9fad3dfd7 Mon Sep 17 00:00:00 2001
From: Hans Bakker <h.bakker@antwebsystems.com>
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
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
-<entity-facade-xml type="seed">
+<entity-facade-xml type="seedMoqui">

<!-- General Item Types (Order, Return, Invoice) -->
<moqui.basic.EnumerationType description="Item Type (Order, Return, Invoice)" enumTypeId="ItemType"/>
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
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
-<entity-facade-xml type="install">
+<entity-facade-xml type="installMoqui">
<!-- Uses syntax in https://docs.oracle.com/javase/8/docs/api/javax/swing/text/MaskFormatter.html -->
<!-- Only used if PartyAcctgPreference.glAccountCodeMask is empty or the context only supports this global or user setting -->
<moqui.security.UserGroupPreference userGroupId="ALL_USERS" preferenceKey="GlAccountCodeMask" preferenceValue="###-###-###"/>
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
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
-<entity-facade-xml type="install">
+<entity-facade-xml type="installMoqui">

<!-- =============================================================================================================
NOTE: While based on real data this data is for demo/testing purposes only. AS STATED IN THE LICENSE THERE IS
--
2.34.1

9 changes: 8 additions & 1 deletion service/growerp.rest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ along with this software (see the LICENSE.md file). If not, see
<!-- flutter versioned REST interface -->
<resource name="100">
<!-- general -->
<resource name="Ping" description="to check if the system is available, no authorization required">
<resource name="Ping" require-authentication="anonymous-all"
description="to check if the system is available, no authorization required">
<method type="get"><service name="growerp.100.GeneralServices100.check#Ping"/></method></resource>
<resource name="Authenticate">
<method type="get"><service name="growerp.100.GeneralServices100.get#Authenticate"/></method></resource>
Expand All @@ -37,6 +38,8 @@ along with this software (see the LICENSE.md file). If not, see
<!--resource name="Image just for internal use
<method type="post"><service name="growerp.100.ImageServices100.upload#Image"/></method></resource-->
<!-- parties -->
<resource name="CheckEmail" require-authentication="anonymous-all">
<method type="get"><service name="growerp.100.PartyServices100.check#Email"/></method></resource>
<resource name="CheckCompany" require-authentication="anonymous-all">
<method type="get"><service name="growerp.100.PartyServices100.check#Company"/></method></resource>
<resource name="UserAndCompany" require-authentication="anonymous-all">
Expand Down Expand Up @@ -115,8 +118,12 @@ along with this software (see the LICENSE.md file). If not, see
<method type="patch"><service name="growerp.100.CrmServices100.update#Opportunity"/></method>
<method type="delete"><service name="growerp.100.CrmServices100.delete#Opportunity"/></method></resource>
<!-- Accounting -->
<resource name="Timeperiod">
<method type="get"><service name="growerp.100.AccountingServices100.get#TimePeriod"/></method></resource>
<resource name="BalanceSheet">
<method type="get"><service name="growerp.100.AccountingServices100.get#BalanceSheet"/></method></resource>
<resource name="BalanceSummary">
<method type="get"><service name="growerp.100.AccountingServices100.get#BalanceSummary"/></method></resource>
<resource name="Ledger">
<method type="get"><service name="growerp.100.AccountingServices100.get#Ledger"/></method></resource>
<!--resource name="Payment">
Expand Down
Loading

0 comments on commit 6c25e58

Please sign in to comment.