Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Oct 11, 2024
2 parents 9b96fc7 + a2cd95c commit 9c18854
Show file tree
Hide file tree
Showing 83 changed files with 2,147 additions and 2,072 deletions.
168 changes: 94 additions & 74 deletions mes-application/src/main/resources/schema/demo_db_cn.sql

Large diffs are not rendered by default.

168 changes: 94 additions & 74 deletions mes-application/src/main/resources/schema/demo_db_en.sql

Large diffs are not rendered by default.

168 changes: 94 additions & 74 deletions mes-application/src/main/resources/schema/demo_db_fr.sql

Large diffs are not rendered by default.

168 changes: 94 additions & 74 deletions mes-application/src/main/resources/schema/demo_db_pl.sql

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public void updateCosts(final ViewDefinitionState viewDefinitionState, final Com
form.setEntity(updateCostsInOrder(order));
}

private Entity updateCostsInOrder(Entity order) {
public Entity updateCostsInOrder(Entity order) {
List<Entity> orderMaterialsCosts = orderMaterialsCostDataGenerator.generateUpdatedMaterialsListFor(order);
order.setField(OrderFieldsCNFM.TECHNOLOGY_INST_OPER_PRODUCT_IN_COMPS, orderMaterialsCosts);
return order.getDataDefinition().save(order);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.qcadoo.mes.costNormsForProduct;

import com.qcadoo.mes.basic.constants.CurrencyFields;
import com.qcadoo.mes.basic.util.CurrencyService;
import com.qcadoo.mes.costNormsForProduct.constants.ProductFieldsCNFP;
import com.qcadoo.model.api.BigDecimalUtils;
import com.qcadoo.model.api.Entity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.Objects;

@Service
public class CostNormsForProductService {

@Autowired
private CurrencyService currencyService;

public BigDecimal getNominalCost(final Entity product) {
BigDecimal nominalCost = BigDecimalUtils.convertNullToZero(product.getDecimalField(ProductFieldsCNFP.NOMINAL_COST));
Entity currency = product.getBelongsToField(ProductFieldsCNFP.NOMINAL_COST_CURRENCY);

if (Objects.nonNull(currency) && CurrencyService.PLN.equals(currencyService.getCurrencyAlphabeticCode())
&& !CurrencyService.PLN.equals(currency.getStringField(CurrencyFields.ALPHABETIC_CODE))) {
nominalCost = currencyService.getConvertedValue(nominalCost, currency);
}

return nominalCost;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.qcadoo.mes.masterOrders.controllers;

import com.google.common.collect.ImmutableMap;
import com.qcadoo.mes.basic.ParameterService;
import com.qcadoo.mes.masterOrders.constants.MasterOrdersConstants;
import com.qcadoo.view.api.crud.CrudService;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import java.util.Locale;
import java.util.Map;

@Controller
public class MasterOrdersControllerMO {

@Autowired
private CrudService crudService;

@Autowired
private ParameterService parameterService;

@RequestMapping(value = "salesParameters", method = RequestMethod.GET)
public ModelAndView getSalesParametersPageView(final Locale locale) {
JSONObject json = new JSONObject(ImmutableMap.of("form.id", parameterService.getParameterId().toString()));

Map<String, String> arguments = ImmutableMap.of("context", json.toString());

return crudService.prepareView(MasterOrdersConstants.PLUGIN_IDENTIFIER, "salesParameters", arguments, locale);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,9 @@ masterOrders.orderedProductConfiguratorAttributeDetails.window.mainTab.form.attr
orders.orderDetails.window.masterOrderTab.tabLabel = 销售订单
orders.orderDetails.window.masterOrderTab.masterOrder.label.focus = 选择销售订单
orders.orderDetails.window.masterOrderTab.masterOrder.lookup.window.grid.header = 销售订单
orders.planningParameters.window.masterOrderDefinitionsTab.tabLabel = 销售订单
orders.planningParameters.window.masterOrderDefinitionsTab.masterOrderDefinitions.header = 销售订单定义
orders.planningParameters.window.masterOrderDefinitionsTab.sameOrderNumber.description = 选择此项,从销售订单中创建的生产订单,编号与销售订单一致,结尾将不带有001、002等后缀
masterOrders.salesParameters.window.mainTab.tabLabel = 销售订单
masterOrders.salesParameters.window.mainTab.salesParametersForm.masterOrderDefinitions.header = 销售订单定义
masterOrders.salesParameters.window.mainTab.salesParametersForm.sameOrderNumber.description = 选择此项,从销售订单中创建的生产订单,编号与销售订单一致,结尾将不带有001、002等后缀
orders.ordersParameters.window.ordersFromMasterOrdersTab.copyDescription.description = 选择是否希望销售订单描述移动到创建的生产订单的描述
masterOrders.masterOrderDefinitionDetails.window.mainTab.masterOrderDefinitionDetails.headerNew = 新销售订单定义
masterOrders.masterOrderDefinitionDetails.window.mainTab.masterOrderDefinitionDetails.headerEdit = 编辑订单定义
Expand Down Expand Up @@ -571,8 +571,8 @@ masterOrders.orderedProductsForFamily.window.mainTab.salesPlanProduct.products.c
masterOrders.orderedProductsForFamily.window.mainTab.salesPlanProduct.products.column.productSize = 尺寸
masterOrders.orderedProductsForFamily.window.mainTab.salesPlanProduct.products.column.productUnit = 单位
masterOrders.generatingOrders.window.mainTab.masterOrderDefinitionDetails.startDate.label = 开始日期
orders.planningParameters.window.masterOrderDefinitionsTab.completeMasterOrderAfterOrderingPositions.label = 在产品已生产状态后完成销售订单
orders.planningParameters.window.masterOrderDefinitionsTab.completeMasterOrderAfterOrderingPositions.description = 如果您希望将销售订单明细设置为已生产状态后,将销售订单的状态设置为完成,请选择此参数
masterOrders.salesParameters.window.mainTab.salesParametersForm.completeMasterOrderAfterOrderingPositions.label = 在产品已生产状态后完成销售订单
masterOrders.salesParameters.window.mainTab.salesParametersForm.completeMasterOrderAfterOrderingPositions.description = 如果您希望将销售订单明细设置为已生产状态后,将销售订单的状态设置为完成,请选择此参数
masterOrders.masterOrderPositionsList.window.mainTab.masterOrderPositions.filter.new = 新的
masterOrders.masterOrderPositionsList.window.mainTab.masterOrderPositions.filter.ordered = 已生产订单
masterOrders.ordersGenerationFromProducts.ribbon.message.generateOrders = 将为每个选定的产品创建生产订单
Expand Down Expand Up @@ -651,10 +651,10 @@ masterOrders.outsourceProcessingComponent.window.mainTab.form.dateFrom.label =
masterOrders.outsourceProcessingComponent.window.mainTab.form.dateTo.label = 结束日期
masterOrders.outsourceProcessingComponent.info.generatedOrder = 创建组件订单: {0}
masterOrders.outsourceProcessingComponent.info.notGeneratedOrder = 创建组件订单失败
orders.planningParameters.window.masterOrderDefinitionsTab.masterOrderReleaseLocation.label = 产品发货仓库和发货文档
orders.planningParameters.window.masterOrderDefinitionsTab.masterOrderReleaseLocation.label.focus = 选择仓库
orders.planningParameters.window.masterOrderDefinitionsTab.masterOrderReleaseLocation.description = 在为销售订单创建的发货文件中注明需要补充的仓库。
orders.planningParameters.window.masterOrderDefinitionsTab.masterOrderReleaseLocation.lookup.window.grid.header = 仓库
masterOrders.salesParameters.window.mainTab.salesParametersForm.masterOrderReleaseLocation.label = 产品发货仓库和发货文档
masterOrders.salesParameters.window.mainTab.salesParametersForm.masterOrderReleaseLocation.label.focus = 选择仓库
masterOrders.salesParameters.window.mainTab.salesParametersForm.masterOrderReleaseLocation.description = 在为销售订单创建的发货文件中注明需要补充的仓库。
masterOrders.salesParameters.window.mainTab.salesParametersForm.masterOrderReleaseLocation.lookup.window.grid.header = 仓库
masterOrders.ribbon.documents.createReleaseDocument.message = 选择你想去发货和释放的产品
masterOrders.masterOrder.releaseDocument.quantity.notEnoughResources = 产品: {0}资源不足
masterOrders.menu.orders.masterOrders = 销售订单
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@ orders.orderDetails.window.masterOrderTab.tabLabel = Hauptauftrag
orders.orderDetails.window.masterOrderTab.masterOrder.label.focus = einen Hauptauftrag wählen
orders.orderDetails.window.masterOrderTab.masterOrder.lookup.window.grid.header = Hauptaufträge

orders.planningParameters.window.masterOrderDefinitionsTab.tabLabel = Hauptaufträge
masterOrders.salesParameters.window.mainTab.tabLabel = Hauptaufträge

orders.planningParameters.window.masterOrderDefinitionsTab.sameOrderNumber.description = Nach der Markierung dieser Option wird dem Fertigungsauftrag, der aus dem Hauptauftrag erstellt wurde, genau dieselbe Nummer zugeteilt, ohne die Endung 001, 002, usw.
masterOrders.salesParameters.window.mainTab.salesParametersForm.sameOrderNumber.description = Nach der Markierung dieser Option wird dem Fertigungsauftrag, der aus dem Hauptauftrag erstellt wurde, genau dieselbe Nummer zugeteilt, ohne die Endung 001, 002, usw.

orders.planningParameters.window.masterOrderDefinitionsTab.masterOrderDefinitions.header = Definitionen der Aufträge
masterOrders.salesParameters.window.mainTab.salesParametersForm.masterOrderDefinitions.header = Definitionen der Aufträge

masterOrders.masterOrderDefinitionDetails.window.mainTab.masterOrderDefinitionDetails.headerNew = Eine neue Auftragsdefinition
masterOrders.masterOrderDefinitionDetails.window.mainTab.masterOrderDefinitionDetails.headerEdit = Auftragsdefinition bearbeiten
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ masterOrders.menu.requirements.salesPlanMaterialRequirementsList = Sales plan ma
masterOrders.menu.requirements.masterOrdersMaterialRequirementsList = Sales orders material requirements
masterOrders.menu.materialFlow.salesVolumesList = Sales volume
masterOrders.menu.products.orderedProductConfiguratorsList = Ordered product configurator
masterOrders.menu.parameters.salesParameters = Sales parameters


### MODEL
Expand Down Expand Up @@ -244,6 +245,10 @@ basic.parameter.ordersGenerationNotCompleteDates.label = Do not set dates in gen
basic.parameter.masterOrderDefinitions.label = Sales orders definitions
basic.parameter.copyDescription.label = Copy description from sales order
basic.parameter.allowMasterOrderDeadlineChange.label = Allow to change of the sales order deadline
basic.parameter.priceListAttribute1.label = Attribute 1
basic.parameter.priceListAttribute1.label.focus = Select attribute
basic.parameter.priceListAttribute2.label = Attribute 2
basic.parameter.priceListAttribute2.label.focus = Select attribute

orders.order.masterOrder.label = Sales order
orders.order.masterOrder.label.focus = Select sales order
Expand Down Expand Up @@ -471,10 +476,14 @@ orders.orderDetails.window.masterOrderTab.tabLabel = Sales orders
orders.orderDetails.window.masterOrderTab.masterOrder.label.focus = Select sales order
orders.orderDetails.window.masterOrderTab.masterOrder.lookup.window.grid.header = Sales orders

orders.planningParameters.window.masterOrderDefinitionsTab.tabLabel = Sales orders
orders.planningParameters.window.masterOrderDefinitionsTab.masterOrderDefinitions.header = Order definitions
orders.planningParameters.window.masterOrderDefinitionsTab.sameOrderNumber.description = Checking this option will give the production order created from the master exactly the same number as in the sales order, without end 001, 002, and so on.
orders.planningParameters.window.masterOrderDefinitionsTab.allowMasterOrderDeadlineChange.description = Select the parameter and the deadline in the order can be changed at any time, regardless of the status of related orders. Remember that changing the date here will not overwrite the orders.
masterOrders.salesParameters.window.mainTab.tabLabel = Sales orders
masterOrders.salesParameters.window.mainTab.salesParametersForm.headerEdit = Sale
masterOrders.salesParameters.window.mainTab.salesParametersForm.masterOrderDefinitions.header = Order definitions
masterOrders.salesParameters.window.mainTab.salesParametersForm.sameOrderNumber.description = Checking this option will give the production order created from the master exactly the same number as in the sales order, without end 001, 002, and so on.
masterOrders.salesParameters.window.mainTab.salesParametersForm.allowMasterOrderDeadlineChange.description = Select the parameter and the deadline in the order can be changed at any time, regardless of the status of related orders. Remember that changing the date here will not overwrite the orders.
masterOrders.salesParameters.window.priceListsTab.tabLabel = Prices lists
masterOrders.salesParameters.window.priceListsTab.priceListAttribute1.lookup.window.grid.header = Attributes
masterOrders.salesParameters.window.priceListsTab.priceListAttribute2.lookup.window.grid.header = Attributes

orders.ordersParameters.window.ordersFromMasterOrdersTab.copyDescription.description = Select if you want the sales order description to move to the description of the created production order.

Expand Down Expand Up @@ -789,8 +798,8 @@ masterOrders.orderedProductsForFamily.window.mainTab.salesPlanProduct.products.c
masterOrders.orderedProductsForFamily.window.mainTab.salesPlanProduct.products.column.productUnit = Unit

masterOrders.generatingOrders.window.mainTab.masterOrderDefinitionDetails.startDate.label = Start Date
orders.planningParameters.window.masterOrderDefinitionsTab.completeMasterOrderAfterOrderingPositions.label = Complete sales order after order <br/> of all items
orders.planningParameters.window.masterOrderDefinitionsTab.completeMasterOrderAfterOrderingPositions.description = Check this parameter if you want the status of the Sales order to be set to Completed from the vending machine after setting each item of sales order to the status of Order.
masterOrders.salesParameters.window.mainTab.salesParametersForm.completeMasterOrderAfterOrderingPositions.label = Complete sales order after order <br/> of all items
masterOrders.salesParameters.window.mainTab.salesParametersForm.completeMasterOrderAfterOrderingPositions.description = Check this parameter if you want the status of the Sales order to be set to Completed from the vending machine after setting each item of sales order to the status of Order.
masterOrders.masterOrderPositionsList.window.mainTab.masterOrderPositions.filter.new = new
masterOrders.masterOrderPositionsList.window.mainTab.masterOrderPositions.filter.ordered = ordered

Expand Down Expand Up @@ -890,10 +899,10 @@ masterOrders.outsourceProcessingComponent.window.mainTab.form.dateTo.label = End
masterOrders.outsourceProcessingComponent.info.generatedOrder = Generated order for component: {0}
masterOrders.outsourceProcessingComponent.info.notGeneratedOrder = Failed to generate order for component.

orders.planningParameters.window.masterOrderDefinitionsTab.masterOrderReleaseLocation.label = Product issue warehouse with release document
orders.planningParameters.window.masterOrderDefinitionsTab.masterOrderReleaseLocation.label.focus = Select a warehouse
orders.planningParameters.window.masterOrderDefinitionsTab.masterOrderReleaseLocation.description = Indicate the warehouse to be replenished in the release document created for the sales order.
orders.planningParameters.window.masterOrderDefinitionsTab.masterOrderReleaseLocation.lookup.window.grid.header = Warehouses
masterOrders.salesParameters.window.mainTab.salesParametersForm.masterOrderReleaseLocation.label = Product issue warehouse with release document
masterOrders.salesParameters.window.mainTab.salesParametersForm.masterOrderReleaseLocation.label.focus = Select a warehouse
masterOrders.salesParameters.window.mainTab.salesParametersForm.masterOrderReleaseLocation.description = Indicate the warehouse to be replenished in the release document created for the sales order.
masterOrders.salesParameters.window.mainTab.salesParametersForm.masterOrderReleaseLocation.lookup.window.grid.header = Warehouses
masterOrders.ribbon.documents.createReleaseDocument.message = Select the products you want to issue with the release

masterOrders.masterOrder.releaseDocument.quantity.notEnoughResources = Not enough available resources for product: {0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ masterOrders.salesPlanMaterialRequirementDetails.window.materialsTab.salesPlanMa
orders.orderDetails.window.masterOrderTab.tabLabel = Commandes Ventes
orders.orderDetails.window.masterOrderTab.masterOrder.label.focus = Sélectionnez la commande client
orders.orderDetails.window.masterOrderTab.masterOrder.lookup.window.grid.header = Commandes Ventes
orders.planningParameters.window.masterOrderDefinitionsTab.tabLabel = Commandes Ventes
orders.planningParameters.window.masterOrderDefinitionsTab.masterOrderDefinitions.header = Définitions de la commande
orders.planningParameters.window.masterOrderDefinitionsTab.sameOrderNumber.description = Cocher cette option donnera à l'ordre de fabrication créé à partir du maître exactement le même numéro que dans la commande client, sans fin 001, 002, etc.
masterOrders.salesParameters.window.mainTab.tabLabel = Commandes Ventes
masterOrders.salesParameters.window.mainTab.salesParametersForm.masterOrderDefinitions.header = Définitions de la commande
masterOrders.salesParameters.window.mainTab.salesParametersForm.sameOrderNumber.description = Cocher cette option donnera à l'ordre de fabrication créé à partir du maître exactement le même numéro que dans la commande client, sans fin 001, 002, etc.
orders.ordersParameters.window.ordersFromMasterOrdersTab.copyDescription.description = Sélectionnez si vous souhaitez que la description de la commande client passe à la description de l'ordre de fabrication créé.
masterOrders.masterOrderDefinitionDetails.window.mainTab.masterOrderDefinitionDetails.headerNew = Nouvelle définition de commande
masterOrders.masterOrderDefinitionDetails.window.mainTab.masterOrderDefinitionDetails.headerEdit = Modifier la définition de la commande
Expand Down Expand Up @@ -362,8 +362,8 @@ masterOrders.orderedProductsForFamily.window.mainTab.salesPlanProduct.products.c
masterOrders.orderedProductsForFamily.window.mainTab.salesPlanProduct.products.column.productSize = Taille
masterOrders.orderedProductsForFamily.window.mainTab.salesPlanProduct.products.column.productUnit = Unité
masterOrders.generatingOrders.window.mainTab.masterOrderDefinitionDetails.startDate.label = Date de début
orders.planningParameters.window.masterOrderDefinitionsTab.completeMasterOrderAfterOrderingPositions.label = Commande client complète après commande <br/> de tous les articles
orders.planningParameters.window.masterOrderDefinitionsTab.completeMasterOrderAfterOrderingPositions.description = Cochez ce paramètre si vous souhaitez que le statut de la commande client soit défini sur Terminé à partir du distributeur automatique après avoir défini chaque article de la commande client sur le statut Commande.
masterOrders.salesParameters.window.mainTab.salesParametersForm.completeMasterOrderAfterOrderingPositions.label = Commande client complète après commande <br/> de tous les articles
masterOrders.salesParameters.window.mainTab.salesParametersForm.completeMasterOrderAfterOrderingPositions.description = Cochez ce paramètre si vous souhaitez que le statut de la commande client soit défini sur Terminé à partir du distributeur automatique après avoir défini chaque article de la commande client sur le statut Commande.
masterOrders.masterOrderPositionsList.window.mainTab.masterOrderPositions.filter.new = Nouveau
masterOrders.masterOrderPositionsList.window.mainTab.masterOrderPositions.filter.ordered = commandé
masterOrders.ordersGenerationFromProducts.ribbon.message.generateOrders = Des ordres de fabrication seront créés pour chacun des produits sélectionnés
Expand Down
Loading

0 comments on commit 9c18854

Please sign in to comment.