First commit waiting for Budget Alert
This commit is contained in:
16
modules/axelor-open-suite/axelor-purchase/build.gradle
Normal file
16
modules/axelor-open-suite/axelor-purchase/build.gradle
Normal file
@ -0,0 +1,16 @@
|
||||
apply plugin: "com.axelor.app-module"
|
||||
|
||||
apply from: "../version.gradle"
|
||||
|
||||
apply {
|
||||
version = openSuiteVersion
|
||||
}
|
||||
|
||||
axelor {
|
||||
title "Axelor Purchase"
|
||||
description "Axelor Purchase Module"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(":modules:axelor-base")
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.db.repo;
|
||||
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLine;
|
||||
import com.axelor.apps.purchase.service.PurchaseOrderService;
|
||||
import com.axelor.inject.Beans;
|
||||
import javax.persistence.PersistenceException;
|
||||
|
||||
public class PurchaseOrderManagementRepository extends PurchaseOrderRepository {
|
||||
|
||||
@Override
|
||||
public PurchaseOrder copy(PurchaseOrder entity, boolean deep) {
|
||||
|
||||
PurchaseOrder copy = super.copy(entity, deep);
|
||||
|
||||
copy.setStatusSelect(PurchaseOrderRepository.STATUS_DRAFT);
|
||||
copy.setPurchaseOrderSeq(null);
|
||||
copy.setVersionNumber(1);
|
||||
copy.setDeliveryDate(null);
|
||||
copy.setValidatedByUser(null);
|
||||
copy.setValidationDate(null);
|
||||
copy.setBarCodeSeq(null);
|
||||
for (PurchaseOrderLine purchaseOrderLine : copy.getPurchaseOrderLineList()) {
|
||||
purchaseOrderLine.setDesiredDelivDate(null);
|
||||
purchaseOrderLine.setEstimatedDelivDate(null);
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseOrder save(PurchaseOrder purchaseOrder) {
|
||||
|
||||
try {
|
||||
purchaseOrder = super.save(purchaseOrder);
|
||||
Beans.get(PurchaseOrderService.class).setDraftSequence(purchaseOrder);
|
||||
Beans.get(PurchaseOrderService.class).setPurchaseOrderBarCodeSeq(purchaseOrder);
|
||||
return purchaseOrder;
|
||||
} catch (Exception e) {
|
||||
throw new PersistenceException(e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.db.repo;
|
||||
|
||||
import com.axelor.apps.base.db.repo.SequenceRepository;
|
||||
import com.axelor.apps.base.service.administration.SequenceService;
|
||||
import com.axelor.apps.purchase.db.PurchaseRequest;
|
||||
import com.axelor.apps.purchase.exception.IExceptionMessage;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.exception.db.repo.TraceBackRepository;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import javax.persistence.PersistenceException;
|
||||
|
||||
public class PurchaseRequestManagementRepository extends PurchaseRequestRepository {
|
||||
|
||||
@Override
|
||||
public PurchaseRequest save(PurchaseRequest entity) {
|
||||
try {
|
||||
if (entity.getPurchaseRequestSeq() == null) {
|
||||
String seq =
|
||||
Beans.get(SequenceService.class)
|
||||
.getSequenceNumber(SequenceRepository.PURCHASE_REQUEST, entity.getCompany());
|
||||
if (seq == null) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_CONFIGURATION_ERROR,
|
||||
I18n.get(IExceptionMessage.PURCHASE_REQUEST_1),
|
||||
entity.getCompany().getName());
|
||||
}
|
||||
entity.setPurchaseRequestSeq(seq);
|
||||
}
|
||||
return super.save(entity);
|
||||
} catch (Exception e) {
|
||||
throw new PersistenceException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseRequest copy(PurchaseRequest entity, boolean deep) {
|
||||
|
||||
PurchaseRequest copy = super.copy(entity, deep);
|
||||
copy.setStatusSelect(PurchaseRequestRepository.STATUS_DRAFT);
|
||||
copy.setPurchaseRequestSeq(null);
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** */
|
||||
package com.axelor.apps.purchase.exception;
|
||||
|
||||
/** @author axelor */
|
||||
public interface IExceptionMessage {
|
||||
|
||||
static final String PURCHASE_ORDER_LINE_TAX_LINE = /*$$(*/ "A tax line is missing" /*)*/;
|
||||
static final String PURCHASE_ORDER_LINE_MIN_QTY = /*$$(*/
|
||||
"The minimum order quantity of %s to the supplier is not respected." /*)*/;
|
||||
static final String PURCHASE_ORDER_LINE_NO_SUPPLIER_CATALOG = /*$$(*/
|
||||
"This product is not available from the supplier." /*)*/;
|
||||
|
||||
/** Purchase order service impl */
|
||||
public static final String PURCHASE_ORDER_1 = /*$$(*/
|
||||
"The company %s doesn't have any configured sequence for the purchase orders" /*)*/;
|
||||
|
||||
/** Purchase config service */
|
||||
public static final String PURCHASE_CONFIG_1 = /*$$(*/
|
||||
"You must configure Purchase module for the company %s" /*)*/;
|
||||
|
||||
/** Merge purchase order */
|
||||
public static final String PURCHASE_ORDER_MERGE_ERROR_CURRENCY = /*$$(*/
|
||||
"The currency is required and must be the same for all purchase orders" /*)*/;
|
||||
|
||||
public static final String PURCHASE_ORDER_MERGE_ERROR_SUPPLIER_PARTNER = /*$$(*/
|
||||
"The supplier Partner is required and must be the same for all purchase orders" /*)*/;
|
||||
public static final String PURCHASE_ORDER_MERGE_ERROR_COMPANY = /*$$(*/
|
||||
"The company is required and must be the same for all purchase orders" /*)*/;
|
||||
public static final String PURCHASE_ORDER_MERGE_ERROR_TRADING_NAME = /*$$(*/
|
||||
"The trading name must be the same for all purchase orders" /*)*/;
|
||||
public static final String PURCHASE_ORDER_MERGE_ERROR_STATUS_SELECT = /*$$(*/
|
||||
"The status select name must be the same for all purchase orders" /*)*/;
|
||||
|
||||
/** Blocking supplier */
|
||||
String SUPPLIER_BLOCKED = /*$$(*/ "This supplier is blocked:" /*)*/;
|
||||
|
||||
/*
|
||||
* Purchase order printing
|
||||
*/
|
||||
String NO_PURCHASE_ORDER_SELECTED_FOR_PRINTING = /*$$(*/
|
||||
"Please select the purchase order(s) to print." /*)*/;
|
||||
String PURCHASE_ORDER_MISSING_PRINTING_SETTINGS = /*$$(*/
|
||||
"Please fill printing settings on purchase order %s" /*)*/;
|
||||
String PURCHASE_ORDERS_MISSING_PRINTING_SETTINGS = /*$$(*/
|
||||
"Please fill printing settings on following purchase orders: %s" /*)*/;
|
||||
|
||||
String NO_PURCHASE_REQUEST_SELECTED_FOR_PRINTING = /*$$(*/
|
||||
"Please select the purchase request(s) to print." /*)*/;
|
||||
String PURCHASE_REQUEST_MISSING_PRINTING_SETTINGS = /*$$(*/
|
||||
"Please fill printing settings on purchase request %s" /*)*/;
|
||||
String PURCHASE_REQUESTS_MISSING_PRINTING_SETTINGS = /*$$(*/
|
||||
"Please fill printing settings on following purchase requests: %s" /*)*/;
|
||||
|
||||
public static final String PURCHASE_REQUEST_1 = /*$$(*/
|
||||
"There is no sequence set for the purchase requests for the company %s" /*)*/;
|
||||
public static final String PURCHASE_REQUEST_MISSING_SUPPLIER_USER = /*$$(*/
|
||||
"Please enter supplier for following purchase request : %s" /*)*/;
|
||||
public static final String TCO = /*$$(*/ "CTO not validated for products : %s" /*)*/;
|
||||
public static final String NO_TCO = /*$$(*/ "CTO not present for products : %s" /*)*/;
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.module;
|
||||
|
||||
import com.axelor.app.AxelorModule;
|
||||
import com.axelor.apps.base.service.ProductServiceImpl;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderManagementRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseRequestManagementRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseRequestRepository;
|
||||
import com.axelor.apps.purchase.service.ProductServicePurchaseImpl;
|
||||
import com.axelor.apps.purchase.service.PurchaseOrderLineService;
|
||||
import com.axelor.apps.purchase.service.PurchaseOrderLineServiceImpl;
|
||||
import com.axelor.apps.purchase.service.PurchaseOrderService;
|
||||
import com.axelor.apps.purchase.service.PurchaseOrderServiceImpl;
|
||||
import com.axelor.apps.purchase.service.PurchaseProductService;
|
||||
import com.axelor.apps.purchase.service.PurchaseProductServiceImpl;
|
||||
import com.axelor.apps.purchase.service.PurchaseRequestService;
|
||||
import com.axelor.apps.purchase.service.PurchaseRequestServiceImpl;
|
||||
import com.axelor.apps.purchase.service.app.AppPurchaseService;
|
||||
import com.axelor.apps.purchase.service.app.AppPurchaseServiceImpl;
|
||||
import com.axelor.apps.purchase.service.print.PurchaseOrderPrintService;
|
||||
import com.axelor.apps.purchase.service.print.PurchaseOrderPrintServiceImpl;
|
||||
import com.axelor.apps.purchase.service.print.PurchaseRequestPrintService;
|
||||
import com.axelor.apps.purchase.service.print.PurchaseRequestPrintServiceImpl;
|
||||
|
||||
public class PurchaseModule extends AxelorModule {
|
||||
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(PurchaseOrderRepository.class).to(PurchaseOrderManagementRepository.class);
|
||||
bind(PurchaseOrderService.class).to(PurchaseOrderServiceImpl.class);
|
||||
bind(AppPurchaseService.class).to(AppPurchaseServiceImpl.class);
|
||||
bind(PurchaseRequestService.class).to(PurchaseRequestServiceImpl.class);
|
||||
bind(PurchaseProductService.class).to(PurchaseProductServiceImpl.class);
|
||||
bind(PurchaseOrderPrintService.class).to(PurchaseOrderPrintServiceImpl.class);
|
||||
bind(PurchaseRequestPrintService.class).to(PurchaseRequestPrintServiceImpl.class);
|
||||
bind(ProductServiceImpl.class).to(ProductServicePurchaseImpl.class);
|
||||
bind(PurchaseRequestRepository.class).to(PurchaseRequestManagementRepository.class);
|
||||
bind(PurchaseOrderLineService.class).to(PurchaseOrderLineServiceImpl.class);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.report;
|
||||
|
||||
public interface IReport {
|
||||
|
||||
public static final String PURCHASE_ORDER = "PurchaseOrder.rptdesign";
|
||||
public static final String PURCHASE_REQUEST = "PurchaseRequest.rptdesign";
|
||||
public static final String COST_PRICE_SHEET = "CostPriceSheet.rptdesign";
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.report;
|
||||
|
||||
public interface ITranslation {
|
||||
|
||||
public static final String PURCHASE_ORDER_PURCHASE_REFERENCE = /*$$(*/
|
||||
"PurchaseOrder.reference"; /*)*/
|
||||
public static final String PURCHASE_ORDER_PURCHASE_INFO = /*$$(*/
|
||||
"PurchaseOrder.purchaseInfo"; /*)*/
|
||||
|
||||
public static final String PURCHASE_ORDER_ORDER = /*$$(*/ "PurchaseOrder.order"; /*)*/
|
||||
public static final String PURCHASE_ORDER_QUOTE = /*$$(*/ "PurchaseOrder.quote"; /*)*/
|
||||
public static final String PURCHASE_ORDER_DELIVERY_DATE = /*$$(*/
|
||||
"PurchaseOrder.deliveryDate"; /*)*/
|
||||
public static final String PURCHASE_ORDER_PAYMENT_CONDITION = /*$$(*/
|
||||
"PurchaseOrder.paymentCondition"; /*)*/
|
||||
public static final String PURCHASE_ORDER_PAYMENT_MODE = /*$$(*/
|
||||
"PurchaseOrder.paymentMode"; /*)*/
|
||||
public static final String PURCHASE_ORDER_SUPPLY_REF = /*$$(*/ "PurchaseOrder.supplyRef"; /*)*/
|
||||
public static final String PURCHASE_ORDER_CUSTOMER_REF = /*$$(*/
|
||||
"PurchaseOrder.customerRef"; /*)*/
|
||||
public static final String PURCHASE_ORDER_SUPPLIER = /*$$(*/ "PurchaseOrder.supplier"; /*)*/
|
||||
public static final String PURCHASE_ORDER_CUSTOMER = /*$$(*/ "PurchaseOrder.customer"; /*)*/
|
||||
public static final String PURCHASE_ORDER_REF = /*$$(*/ "PurchaseOrder.ref"; /*)*/
|
||||
public static final String PURCHASE_ORDER_DESCRIPTION = /*$$(*/ "PurchaseOrder.description"; /*)*/
|
||||
public static final String PURCHASE_ORDER_TAX = /*$$(*/ "PurchaseOrder.tax"; /*)*/
|
||||
public static final String PURCHASE_ORDER_QTY_UNIT = /*$$(*/ "PurchaseOrder.qtyUnit"; /*)*/
|
||||
public static final String PURCHASE_ORDER_UNIT_PRICE = /*$$(*/ "PurchaseOrder.unitPrice"; /*)*/
|
||||
public static final String PURCHASE_ORDER_PRICE_EXCL_TAX = /*$$(*/
|
||||
"PurchaseOrder.priceExclTax"; /*)*/
|
||||
public static final String PURCHASE_ORDER_PRICE_INCL_TAX = /*$$(*/
|
||||
"PurchaseOrder.priceInclTax"; /*)*/
|
||||
public static final String PURCHASE_ORDER_DISCOUNT_AMOUNT = /*$$(*/
|
||||
"PurchaseOrder.discountAmount"; /*)*/
|
||||
public static final String PURCHASE_ORDER_BASE = /*$$(*/ "PurchaseOrder.base"; /*)*/
|
||||
public static final String PURCHASE_ORDER_TAX_AMOUNT = /*$$(*/ "PurchaseOrder.taxAmount"; /*)*/
|
||||
public static final String PURCHASE_ORDER_TOTAL_EXCL_TAX_WITHOUT_DISCOUNT = /*$$(*/
|
||||
"PurchaseOrder.totalExclTaxWithoutDiscount"; /*)*/
|
||||
public static final String PURCHASE_ORDER_TOTAL_EXCL_TAX = /*$$(*/
|
||||
"PurchaseOrder.totalExclTax"; /*)*/
|
||||
public static final String PURCHASE_ORDER_TOTAL_TAX = /*$$(*/ "PurchaseOrder.totalTax"; /*)*/
|
||||
public static final String PURCHASE_ORDER_TOTAL_INCL_TAX = /*$$(*/
|
||||
"PurchaseOrder.totalInclTax"; /*)*/
|
||||
public static final String PURCHASE_ORDER_TOTAL_DISCOUNT = /*$$(*/
|
||||
"PurchaseOrder.totalDiscount"; /*)*/
|
||||
public static final String PURCHASE_ORDER_AFTER_DISCOUNT = /*$$(*/
|
||||
"PurchaseOrder.afterDiscount"; /*)*/
|
||||
public static final String PURCHASE_ORDER_NOTE = /*$$(*/ "PurchaseOrder.note"; /*)*/
|
||||
public static final String PURCHASE_ORDER_STATE = /*$$(*/ "PurchaseOrder.state"; /*)*/
|
||||
public static final String PURCHASE_ORDER_DRAFT = /*$$(*/ "PurchaseOrder.draft"; /*)*/
|
||||
public static final String PURCHASE_ORDER_REQUESTED = /*$$(*/ "PurchaseOrder.requested"; /*)*/
|
||||
public static final String PURCHASE_ORDER_VALIDATED = /*$$(*/ "PurchaseOrder.validated"; /*)*/
|
||||
public static final String PURCHASE_ORDER_FINISHED = /*$$(*/ "PurchaseOrder.finished"; /*)*/
|
||||
public static final String PURCHASE_ORDER_CANCELED = /*$$(*/ "PurchaseOrder.canceled"; /*)*/
|
||||
public static final String PURCHASE_ORDER_STATUS_DRAFT = /*$$(*/
|
||||
"PurchaseOrder.statusDraft"; /*)*/
|
||||
public static final String PURCHASE_ORDER_STATUS_REQUESTED = /*$$(*/
|
||||
"PurchaseOrder.statusRequested"; /*)*/
|
||||
public static final String PURCHASE_ORDER_STATUS_VALIDATED = /*$$(*/
|
||||
"PurchaseOrder.statusValidated"; /*)*/
|
||||
public static final String PURCHASE_ORDER_STATUS_FINISHED = /*$$(*/
|
||||
"PurchaseOrder.statusFinished"; /*)*/
|
||||
public static final String PURCHASE_ORDER_STATUS_CANCELED = /*$$(*/
|
||||
"PurchaseOrder.statusCanceled"; /*)*/
|
||||
public static final String PURCHASE_ORDER_DESIRED_DELIV_DATE = /*$$(*/
|
||||
"PurchaseOrder.desiredDelivDate"; /*)*/
|
||||
public static final String PURCHASE_ORDER_BUYER = /*$$(*/ "PurchaseOrder.buyer"; /*)*/
|
||||
public static final String PURCHASE_ORDER_BUYER_EMAIL = /*$$(*/ "PurchaseOrder.buyerEmail"; /*)*/
|
||||
public static final String PURCHASE_ORDER_BUYER_PHONE = /*$$(*/ "PurchaseOrder.buyerPhone"; /*)*/
|
||||
public static final String PURCHASE_ORDER_INVOICING_ADDRESS = /*$$(*/
|
||||
"PurchaseOrder.invoicingAddress"; /*)*/
|
||||
public static final String PURCHASE_ORDER_DELIVERY_ADDRESS = /*$$(*/
|
||||
"PurchaseOrder.deliveryAddress"; /*)*/
|
||||
public static final String PURCHASE_ORDER_ORDER_DATE = /*$$(*/ "PurchaseOrder.orderDate"; /*)*/
|
||||
public static final String PURCHASE_ORDER_SUPPLIER_CODE = /*$$(*/
|
||||
"PurchaseOrder.supplierCode"; /*)*/
|
||||
public static final String PURCHASE_ORDER_PRODUCT_PRODUCT_STANDARD = /*$$(*/
|
||||
"PurchaseOrder.productStandard"; /*)*/
|
||||
public static final String PURCHASE_ORDER_PRODUCT_LINE_SEQUENCE = /*$$(*/
|
||||
"PurchaseOrder.productSequence"; /*)*/
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.script;
|
||||
|
||||
import com.axelor.apps.base.service.administration.SequenceService;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.service.PurchaseOrderService;
|
||||
import com.google.inject.Inject;
|
||||
import java.util.Map;
|
||||
|
||||
public class ImportPurchaseOrder {
|
||||
|
||||
@Inject private SequenceService sequenceService;
|
||||
|
||||
@Inject private PurchaseOrderService purchaseOrderService;
|
||||
|
||||
public Object importPurchaseOrder(Object bean, Map<String, Object> values) throws Exception {
|
||||
assert bean instanceof PurchaseOrder;
|
||||
|
||||
PurchaseOrder purchaseOrder = (PurchaseOrder) bean;
|
||||
|
||||
purchaseOrder = purchaseOrderService.computePurchaseOrder(purchaseOrder);
|
||||
|
||||
if (purchaseOrder.getStatusSelect() == 1) {
|
||||
purchaseOrder.setPurchaseOrderSeq(sequenceService.getDraftSequenceNumber(purchaseOrder));
|
||||
} else {
|
||||
purchaseOrderService.requestPurchaseOrder(purchaseOrder);
|
||||
}
|
||||
|
||||
return purchaseOrder;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.script;
|
||||
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLine;
|
||||
import com.axelor.apps.purchase.service.PurchaseOrderLineService;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.inject.Beans;
|
||||
import java.util.Map;
|
||||
|
||||
public class ImportPurchaseOrderLine {
|
||||
|
||||
public Object importPurchaseOrderLine(Object bean, Map<String, Object> values)
|
||||
throws AxelorException {
|
||||
assert bean instanceof PurchaseOrderLine;
|
||||
|
||||
PurchaseOrderLine purchaseOrderLine = (PurchaseOrderLine) bean;
|
||||
PurchaseOrderLineService purchaseOrderLineService = Beans.get(PurchaseOrderLineService.class);
|
||||
|
||||
purchaseOrderLineService.compute(purchaseOrderLine, purchaseOrderLine.getPurchaseOrder());
|
||||
return purchaseOrderLine;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,132 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import static com.axelor.apps.base.service.administration.AbstractBatch.FETCH_LIMIT;
|
||||
|
||||
import com.axelor.apps.base.db.ABCAnalysis;
|
||||
import com.axelor.apps.base.db.ABCAnalysisLine;
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.base.db.repo.ABCAnalysisClassRepository;
|
||||
import com.axelor.apps.base.db.repo.ABCAnalysisLineRepository;
|
||||
import com.axelor.apps.base.db.repo.ABCAnalysisRepository;
|
||||
import com.axelor.apps.base.db.repo.ProductRepository;
|
||||
import com.axelor.apps.base.service.ABCAnalysisServiceImpl;
|
||||
import com.axelor.apps.base.service.UnitConversionService;
|
||||
import com.axelor.apps.base.service.administration.SequenceService;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLine;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderLineRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderRepository;
|
||||
import com.axelor.db.JPA;
|
||||
import com.axelor.db.Query;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.google.inject.Inject;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public class ABCAnalysisServicePurchaseImpl extends ABCAnalysisServiceImpl {
|
||||
|
||||
protected PurchaseOrderLineRepository purchaseOrderLineRepository;
|
||||
|
||||
private static final String PURCHASABLE_TRUE = " AND self.purchasable = TRUE";
|
||||
|
||||
@Inject
|
||||
public ABCAnalysisServicePurchaseImpl(
|
||||
ABCAnalysisLineRepository abcAnalysisLineRepository,
|
||||
UnitConversionService unitConversionService,
|
||||
ABCAnalysisRepository abcAnalysisRepository,
|
||||
ProductRepository productRepository,
|
||||
PurchaseOrderLineRepository purchaseOrderLineRepository,
|
||||
ABCAnalysisClassRepository abcAnalysisClassRepository,
|
||||
SequenceService sequenceService) {
|
||||
super(
|
||||
abcAnalysisLineRepository,
|
||||
unitConversionService,
|
||||
abcAnalysisRepository,
|
||||
productRepository,
|
||||
abcAnalysisClassRepository,
|
||||
sequenceService);
|
||||
this.purchaseOrderLineRepository = purchaseOrderLineRepository;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Optional<ABCAnalysisLine> createABCAnalysisLine(
|
||||
ABCAnalysis abcAnalysis, Product product) throws AxelorException {
|
||||
ABCAnalysisLine abcAnalysisLine = null;
|
||||
BigDecimal productQty = BigDecimal.ZERO;
|
||||
BigDecimal productWorth = BigDecimal.ZERO;
|
||||
List<PurchaseOrderLine> purchaseOrderLineList;
|
||||
int offset = 0;
|
||||
|
||||
Query<PurchaseOrderLine> purchaseOrderLineQuery =
|
||||
purchaseOrderLineRepository
|
||||
.all()
|
||||
.filter(
|
||||
"(self.purchaseOrder.statusSelect = :statusValidated OR self.purchaseOrder.statusSelect = :statusFinished) AND self.purchaseOrder.validationDate >= :startDate AND self.purchaseOrder.validationDate <= :endDate AND self.product.id = :productId")
|
||||
.bind("statusValidated", PurchaseOrderRepository.STATUS_VALIDATED)
|
||||
.bind("statusFinished", PurchaseOrderRepository.STATUS_FINISHED)
|
||||
.bind("startDate", abcAnalysis.getStartDate())
|
||||
.bind("endDate", abcAnalysis.getEndDate())
|
||||
.bind("productId", product.getId())
|
||||
.order("id");
|
||||
|
||||
while (!(purchaseOrderLineList = purchaseOrderLineQuery.fetch(FETCH_LIMIT, offset)).isEmpty()) {
|
||||
offset += purchaseOrderLineList.size();
|
||||
abcAnalysis = abcAnalysisRepository.find(abcAnalysis.getId());
|
||||
|
||||
if (abcAnalysisLine == null) {
|
||||
abcAnalysisLine = super.createABCAnalysisLine(abcAnalysis, product).get();
|
||||
}
|
||||
|
||||
for (PurchaseOrderLine purchaseOrderLine : purchaseOrderLineList) {
|
||||
BigDecimal convertedQty =
|
||||
unitConversionService.convert(
|
||||
purchaseOrderLine.getUnit(),
|
||||
product.getUnit(),
|
||||
purchaseOrderLine.getQty(),
|
||||
2,
|
||||
product);
|
||||
productQty = productQty.add(convertedQty);
|
||||
productWorth = productWorth.add(purchaseOrderLine.getCompanyExTaxTotal());
|
||||
}
|
||||
|
||||
super.incTotalQty(productQty);
|
||||
super.incTotalWorth(productWorth);
|
||||
|
||||
JPA.clear();
|
||||
}
|
||||
|
||||
if (abcAnalysisLine != null) {
|
||||
setQtyWorth(
|
||||
abcAnalysisLineRepository.find(abcAnalysisLine.getId()), productQty, productWorth);
|
||||
}
|
||||
|
||||
return Optional.ofNullable(abcAnalysisLine);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getProductCategoryQuery() {
|
||||
return super.getProductCategoryQuery() + PURCHASABLE_TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getProductFamilyQuery() {
|
||||
return super.getProductFamilyQuery() + PURCHASABLE_TRUE;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.purchase.db.ImportationFolder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.List;
|
||||
import wslite.json.JSONException;
|
||||
|
||||
public interface ImportationFolderService {
|
||||
|
||||
public void draftImportationFolder(ImportationFolder importationFolder);
|
||||
|
||||
public void openImportationFolder(ImportationFolder importationFolder) throws AxelorException;
|
||||
|
||||
public void closeImportationFolder(ImportationFolder importationFolder);
|
||||
|
||||
public void cancelImportationFolder(ImportationFolder importationFolder);
|
||||
|
||||
public void calculateSum(List<PurchaseOrder> purchaseOrders, ImportationFolder importationFolder)
|
||||
throws MalformedURLException, JSONException, AxelorException;
|
||||
}
|
||||
@ -0,0 +1,113 @@
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.base.db.Currency;
|
||||
import com.axelor.apps.base.db.repo.CurrencyRepository;
|
||||
import com.axelor.apps.base.service.CurrencyService;
|
||||
import com.axelor.apps.purchase.db.ImportationFolder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLine;
|
||||
import com.axelor.apps.purchase.db.repo.ImportationFolderRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderLineRepository;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.persist.Transactional;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import wslite.json.JSONException;
|
||||
|
||||
public class ImportationFolderServiceImpl implements ImportationFolderService {
|
||||
|
||||
@Inject protected ImportationFolderRepository importationFolderRepository;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void draftImportationFolder(ImportationFolder importationFolder) {
|
||||
// TODO Auto-generated method stub
|
||||
// importationFolder.setStatusSelect(ImportationFolderRepository.STATUS_DRAFT);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void openImportationFolder(ImportationFolder importationFolder) throws AxelorException {
|
||||
// importationFolder.setStatusSelect(ImportationFolderRepository.STATUS_OPEND);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void closeImportationFolder(ImportationFolder importationFolder) {
|
||||
// importationFolder.setStatusSelect(ImportationFolderRepository.STATUS_CLOSED);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void cancelImportationFolder(ImportationFolder importationFolder) {
|
||||
// importationFolder.setStatusSelect(ImportationFolderRepository.STATUS_CANCELED);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void calculateSum(List<PurchaseOrder> purchaseOrders, ImportationFolder importationFolder)
|
||||
throws MalformedURLException, JSONException, AxelorException {
|
||||
BigDecimal amount = BigDecimal.ZERO;
|
||||
BigDecimal taxAmount = BigDecimal.ZERO;
|
||||
BigDecimal totalAmount = BigDecimal.ZERO;
|
||||
|
||||
for (PurchaseOrder purchaseOrder : purchaseOrders) {
|
||||
if (purchaseOrder.getCurrency().getId() == 148 || purchaseOrder.getCurrency().getId() == 46) {
|
||||
Currency currency =
|
||||
Beans.get(CurrencyRepository.class).find(purchaseOrder.getCurrency().getId());
|
||||
Currency currencyDzd = Beans.get(CurrencyRepository.class).findByCode("DZD");
|
||||
BigDecimal currencyAmount =
|
||||
Beans.get(CurrencyService.class).getCurrencyConversionRate(currency, currencyDzd);
|
||||
|
||||
currencyAmount = currencyAmount.setScale(2, BigDecimal.ROUND_HALF_EVEN);
|
||||
|
||||
BigDecimal finalAmount = purchaseOrder.getExTaxTotal().multiply(currencyAmount);
|
||||
BigDecimal finalTaxAmount = purchaseOrder.getTaxTotal().multiply(currencyAmount);
|
||||
BigDecimal finalTotalAmount = purchaseOrder.getInTaxTotal().multiply(currencyAmount);
|
||||
|
||||
amount = amount.add(finalAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN);
|
||||
taxAmount = taxAmount.add(finalTaxAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN);
|
||||
totalAmount = totalAmount.add(finalTotalAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN);
|
||||
|
||||
} else {
|
||||
amount = amount.add(purchaseOrder.getExTaxTotal());
|
||||
taxAmount = taxAmount.add(purchaseOrder.getTaxTotal());
|
||||
totalAmount = totalAmount.add(purchaseOrder.getInTaxTotal());
|
||||
}
|
||||
}
|
||||
|
||||
importationFolder.setAmount(amount);
|
||||
importationFolder.setTaxAmount(taxAmount);
|
||||
importationFolder.setTotalAmount(totalAmount);
|
||||
|
||||
importationFolderRepository.save(importationFolder);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void calculateAvgPrice(
|
||||
List<PurchaseOrderLine> purchaseOrderLines, ImportationFolder importationFolder)
|
||||
throws MalformedURLException, JSONException, AxelorException {
|
||||
|
||||
for (PurchaseOrderLine purchaseOrderLine : purchaseOrderLines) {
|
||||
|
||||
purchaseOrderLine.setPrice(
|
||||
purchaseOrderLine.getPrice().multiply(importationFolder.getCurrencyRate()));
|
||||
|
||||
BigDecimal qty = purchaseOrderLine.getQty();
|
||||
purchaseOrderLine.setQty(purchaseOrderLine.getReceivedQty());
|
||||
Map<String, BigDecimal> map =
|
||||
Beans.get(PurchaseOrderLineService.class)
|
||||
.compute(purchaseOrderLine, purchaseOrderLine.getPurchaseOrder());
|
||||
purchaseOrderLine.setExTaxTotal(map.get("exTaxTotal"));
|
||||
purchaseOrderLine.setInTaxTotal(map.get("inTaxTotal"));
|
||||
purchaseOrderLine.setQty(qty);
|
||||
Beans.get(PurchaseOrderLineRepository.class).save(purchaseOrderLine);
|
||||
}
|
||||
|
||||
importationFolderRepository.save(importationFolder);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.base.db.repo.ProductRepository;
|
||||
import com.axelor.apps.base.db.repo.ProductVariantRepository;
|
||||
import com.axelor.apps.base.service.ProductServiceImpl;
|
||||
import com.axelor.apps.base.service.ProductVariantService;
|
||||
import com.axelor.apps.base.service.administration.SequenceService;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
public class ProductServicePurchaseImpl extends ProductServiceImpl {
|
||||
|
||||
@Inject
|
||||
public ProductServicePurchaseImpl(
|
||||
ProductVariantService productVariantService,
|
||||
ProductVariantRepository productVariantRepo,
|
||||
SequenceService sequenceService,
|
||||
AppBaseService appBaseService,
|
||||
ProductRepository productRepo) {
|
||||
super(productVariantService, productVariantRepo, sequenceService, appBaseService, productRepo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copyProduct(Product product, Product copy) {
|
||||
super.copyProduct(product, copy);
|
||||
copy.setSupplierCatalogList(null);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,139 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.account.db.TaxLine;
|
||||
import com.axelor.apps.base.db.PriceList;
|
||||
import com.axelor.apps.base.db.PriceListLine;
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.base.db.Unit;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLine;
|
||||
import com.axelor.apps.purchase.db.PurchaseRequestLine;
|
||||
import com.axelor.apps.purchase.db.SupplierCatalog;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface PurchaseOrderLineService {
|
||||
|
||||
public BigDecimal getExTaxUnitPrice(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine, TaxLine taxLine)
|
||||
throws AxelorException;
|
||||
|
||||
public BigDecimal getInTaxUnitPrice(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine, TaxLine taxLine)
|
||||
throws AxelorException;
|
||||
|
||||
public BigDecimal getMinSalePrice(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine) throws AxelorException;
|
||||
|
||||
public BigDecimal getSalePrice(PurchaseOrder purchaseOrder, Product product, BigDecimal price)
|
||||
throws AxelorException;
|
||||
|
||||
public TaxLine getTaxLine(PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine)
|
||||
throws AxelorException;
|
||||
|
||||
/**
|
||||
* Get optional tax line.
|
||||
*
|
||||
* @param purchaseOrder
|
||||
* @param purchaseOrderLine
|
||||
* @return
|
||||
*/
|
||||
Optional<TaxLine> getOptionalTaxLine(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine);
|
||||
|
||||
public BigDecimal computePurchaseOrderLine(PurchaseOrderLine purchaseOrderLine);
|
||||
|
||||
public BigDecimal getCompanyExTaxTotal(BigDecimal exTaxTotal, PurchaseOrder purchaseOrder)
|
||||
throws AxelorException;
|
||||
|
||||
public PriceListLine getPriceListLine(
|
||||
PurchaseOrderLine purchaseOrderLine, PriceList priceList, BigDecimal price);
|
||||
|
||||
public Map<String, BigDecimal> compute(
|
||||
PurchaseOrderLine purchaseOrderLine, PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
|
||||
public BigDecimal computeDiscount(PurchaseOrderLine purchaseOrderLine, Boolean inAti);
|
||||
|
||||
public PurchaseOrderLine createPurchaseOrderLine(
|
||||
PurchaseOrder purchaseOrder,
|
||||
Product product,
|
||||
String productName,
|
||||
String description,
|
||||
BigDecimal qty,
|
||||
Unit unit)
|
||||
throws AxelorException;
|
||||
|
||||
public PurchaseOrderLine createPurchaseOrderLine(
|
||||
PurchaseOrder purchaseOrder,
|
||||
Product product,
|
||||
String productName,
|
||||
String description,
|
||||
BigDecimal qty,
|
||||
Unit unit,
|
||||
PurchaseRequestLine purchaseRequestLine)
|
||||
throws AxelorException;
|
||||
|
||||
public BigDecimal getQty(PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine);
|
||||
|
||||
public SupplierCatalog getSupplierCatalog(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine);
|
||||
|
||||
public BigDecimal convertUnitPrice(Boolean priceIsAti, TaxLine taxLine, BigDecimal price);
|
||||
|
||||
public Map<String, Object> updateInfoFromCatalog(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine) throws AxelorException;
|
||||
|
||||
public Map<String, Object> getDiscountsFromPriceLists(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine, BigDecimal price);
|
||||
|
||||
public int getDiscountTypeSelect(
|
||||
PurchaseOrderLine purchaseOrderLine, PurchaseOrder purchaseOrder, BigDecimal price);
|
||||
|
||||
public Unit getPurchaseUnit(PurchaseOrderLine purchaseOrderLine);
|
||||
|
||||
/**
|
||||
* Get minimum quantity from supplier catalog if available, else return one.
|
||||
*
|
||||
* @param purchaseOrder
|
||||
* @param purchaseOrderLine
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getMinQty(PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine);
|
||||
|
||||
public void checkMinQty(
|
||||
PurchaseOrder purchaseOrder,
|
||||
PurchaseOrderLine purchaseOrderLine,
|
||||
ActionRequest request,
|
||||
ActionResponse response);
|
||||
|
||||
public void checkMultipleQty(PurchaseOrderLine purchaseOrderLine, ActionResponse response);
|
||||
|
||||
public String[] getProductSupplierInfos(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine) throws AxelorException;
|
||||
|
||||
PurchaseOrderLine fill(PurchaseOrderLine line, PurchaseOrder purchaseOrder)
|
||||
throws AxelorException;
|
||||
|
||||
PurchaseOrderLine reset(PurchaseOrderLine line);
|
||||
}
|
||||
@ -0,0 +1,739 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.account.db.Tax;
|
||||
import com.axelor.apps.account.db.TaxEquiv;
|
||||
import com.axelor.apps.account.db.TaxLine;
|
||||
import com.axelor.apps.base.db.Currency;
|
||||
import com.axelor.apps.base.db.Partner;
|
||||
import com.axelor.apps.base.db.PriceList;
|
||||
import com.axelor.apps.base.db.PriceListLine;
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.base.db.Unit;
|
||||
import com.axelor.apps.base.db.repo.PriceListLineRepository;
|
||||
import com.axelor.apps.base.service.CurrencyService;
|
||||
import com.axelor.apps.base.service.PriceListService;
|
||||
import com.axelor.apps.base.service.ProductMultipleQtyService;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.base.service.tax.AccountManagementService;
|
||||
import com.axelor.apps.base.service.tax.FiscalPositionService;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLine;
|
||||
import com.axelor.apps.purchase.db.PurchaseRequestLine;
|
||||
import com.axelor.apps.purchase.db.SupplierCatalog;
|
||||
import com.axelor.apps.purchase.exception.IExceptionMessage;
|
||||
import com.axelor.apps.purchase.service.app.AppPurchaseService;
|
||||
import com.axelor.apps.tool.ContextTool;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.exception.db.repo.TraceBackRepository;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.inject.Inject;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class PurchaseOrderLineServiceImpl implements PurchaseOrderLineService {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
@Inject protected CurrencyService currencyService;
|
||||
|
||||
@Inject protected AccountManagementService accountManagementService;
|
||||
|
||||
@Inject protected PriceListService priceListService;
|
||||
|
||||
@Inject protected AppBaseService appBaseService;
|
||||
|
||||
@Inject protected PurchaseProductService productService;
|
||||
|
||||
@Inject protected ProductMultipleQtyService productMultipleQtyService;
|
||||
|
||||
@Inject protected AppPurchaseService appPurchaseService;
|
||||
|
||||
@Inject protected SupplierCatalogService supplierCatalogService;
|
||||
|
||||
@Deprecated private int sequence = 0;
|
||||
|
||||
@Override
|
||||
public Map<String, BigDecimal> compute(
|
||||
PurchaseOrderLine purchaseOrderLine, PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
|
||||
HashMap<String, BigDecimal> map = new HashMap<>();
|
||||
if (purchaseOrder == null
|
||||
|| purchaseOrderLine.getPrice() == null
|
||||
|| purchaseOrderLine.getInTaxPrice() == null
|
||||
|| purchaseOrderLine.getQty() == null) {
|
||||
return map;
|
||||
}
|
||||
|
||||
BigDecimal exTaxTotal;
|
||||
BigDecimal companyExTaxTotal;
|
||||
BigDecimal inTaxTotal;
|
||||
BigDecimal companyInTaxTotal;
|
||||
BigDecimal priceDiscounted = this.computeDiscount(purchaseOrderLine, purchaseOrder.getInAti());
|
||||
BigDecimal taxRate = BigDecimal.ZERO;
|
||||
|
||||
if (purchaseOrderLine.getTaxLine() != null) {
|
||||
taxRate = purchaseOrderLine.getTaxLine().getValue();
|
||||
}
|
||||
|
||||
if (!purchaseOrder.getInAti()) {
|
||||
exTaxTotal = computeAmount(purchaseOrderLine.getQty(), priceDiscounted);
|
||||
inTaxTotal = exTaxTotal.add(exTaxTotal.multiply(taxRate));
|
||||
companyExTaxTotal = getCompanyExTaxTotal(exTaxTotal, purchaseOrder);
|
||||
companyInTaxTotal = companyExTaxTotal.add(companyExTaxTotal.multiply(taxRate));
|
||||
} else {
|
||||
inTaxTotal = computeAmount(purchaseOrderLine.getQty(), priceDiscounted);
|
||||
exTaxTotal = inTaxTotal.divide(taxRate.add(BigDecimal.ONE), 2, BigDecimal.ROUND_HALF_UP);
|
||||
companyInTaxTotal = getCompanyExTaxTotal(inTaxTotal, purchaseOrder);
|
||||
companyExTaxTotal =
|
||||
companyInTaxTotal.divide(taxRate.add(BigDecimal.ONE), 2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
if (purchaseOrderLine.getProduct() != null) {
|
||||
map.put("saleMinPrice", getMinSalePrice(purchaseOrder, purchaseOrderLine));
|
||||
map.put(
|
||||
"salePrice",
|
||||
getSalePrice(
|
||||
purchaseOrder,
|
||||
purchaseOrderLine.getProduct(),
|
||||
purchaseOrder.getInAti()
|
||||
? purchaseOrderLine.getInTaxPrice()
|
||||
: purchaseOrderLine.getPrice()));
|
||||
}
|
||||
map.put("exTaxTotal", exTaxTotal);
|
||||
map.put("inTaxTotal", inTaxTotal);
|
||||
map.put("companyExTaxTotal", companyExTaxTotal);
|
||||
map.put("companyInTaxTotal", companyInTaxTotal);
|
||||
map.put("priceDiscounted", priceDiscounted);
|
||||
purchaseOrderLine.setExTaxTotal(exTaxTotal);
|
||||
purchaseOrderLine.setInTaxTotal(inTaxTotal);
|
||||
purchaseOrderLine.setPriceDiscounted(priceDiscounted);
|
||||
purchaseOrderLine.setCompanyExTaxTotal(companyExTaxTotal);
|
||||
purchaseOrderLine.setCompanyInTaxTotal(companyInTaxTotal);
|
||||
purchaseOrderLine.setSaleMinPrice(getMinSalePrice(purchaseOrder, purchaseOrderLine));
|
||||
purchaseOrderLine.setSalePrice(
|
||||
getSalePrice(
|
||||
purchaseOrder,
|
||||
purchaseOrderLine.getProduct(),
|
||||
purchaseOrder.getInAti()
|
||||
? purchaseOrderLine.getInTaxPrice()
|
||||
: purchaseOrderLine.getPrice()));
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculer le montant HT d'une ligne de commande.
|
||||
*
|
||||
* @param quantity Quantité.
|
||||
* @param price Le prix.
|
||||
* @return Le montant HT de la ligne.
|
||||
*/
|
||||
public static BigDecimal computeAmount(BigDecimal quantity, BigDecimal price) {
|
||||
|
||||
BigDecimal amount =
|
||||
quantity
|
||||
.multiply(price)
|
||||
.setScale(
|
||||
AppBaseService.DEFAULT_NB_DECIMAL_DIGITS_SUPPLIER_LINE, RoundingMode.HALF_EVEN);
|
||||
|
||||
LOG.debug(
|
||||
"Calcul du montant HT avec une quantité de {} pour {} : {}",
|
||||
new Object[] {quantity, price, amount});
|
||||
|
||||
return amount;
|
||||
}
|
||||
|
||||
public String[] getProductSupplierInfos(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine) throws AxelorException {
|
||||
|
||||
Product product = purchaseOrderLine.getProduct();
|
||||
String productName = "";
|
||||
String productCode = "";
|
||||
|
||||
if (product == null) {
|
||||
return new String[] {productName, productCode};
|
||||
}
|
||||
|
||||
SupplierCatalog supplierCatalog =
|
||||
supplierCatalogService.getSupplierCatalog(product, purchaseOrder.getSupplierPartner());
|
||||
|
||||
if (supplierCatalog != null) {
|
||||
productName = supplierCatalog.getProductSupplierName();
|
||||
productCode = supplierCatalog.getProductSupplierCode();
|
||||
}
|
||||
|
||||
return new String[] {
|
||||
Strings.isNullOrEmpty(productName) ? product.getName() : productName,
|
||||
Strings.isNullOrEmpty(productCode) ? product.getCode() : productCode
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ex. tax unit price of the purchase order line or null if the product is not
|
||||
* available for purchase at the supplier of the purchase order
|
||||
*/
|
||||
@Override
|
||||
public BigDecimal getExTaxUnitPrice(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine, TaxLine taxLine)
|
||||
throws AxelorException {
|
||||
return this.getUnitPrice(purchaseOrder, purchaseOrderLine, taxLine, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the incl. tax unit price of the purchase order line or null if the product is not
|
||||
* available for purchase at the supplier of the purchase order
|
||||
*/
|
||||
@Override
|
||||
public BigDecimal getInTaxUnitPrice(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine, TaxLine taxLine)
|
||||
throws AxelorException {
|
||||
return this.getUnitPrice(purchaseOrder, purchaseOrderLine, taxLine, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* A function used to get the unit price of a purchase order line, either in ati or wt
|
||||
*
|
||||
* @param purchaseOrder the purchase order containing the purchase order line
|
||||
* @param purchaseOrderLine
|
||||
* @param taxLine the tax applied to the unit price
|
||||
* @param resultInAti whether or not you want the result to be in ati
|
||||
* @return the unit price of the purchase order line or null if the product is not available for
|
||||
* purchase at the supplier of the purchase order
|
||||
* @throws AxelorException
|
||||
*/
|
||||
private BigDecimal getUnitPrice(
|
||||
PurchaseOrder purchaseOrder,
|
||||
PurchaseOrderLine purchaseOrderLine,
|
||||
TaxLine taxLine,
|
||||
boolean resultInAti)
|
||||
throws AxelorException {
|
||||
BigDecimal purchasePrice = new BigDecimal(0);
|
||||
Currency purchaseCurrency = null;
|
||||
Product product = purchaseOrderLine.getProduct();
|
||||
SupplierCatalog supplierCatalog =
|
||||
supplierCatalogService.getSupplierCatalog(product, purchaseOrder.getSupplierPartner());
|
||||
|
||||
if (supplierCatalog != null) {
|
||||
purchasePrice = supplierCatalog.getPrice();
|
||||
purchaseCurrency = supplierCatalog.getSupplierPartner().getCurrency();
|
||||
} else {
|
||||
if (product != null) {
|
||||
purchasePrice = product.getPurchasePrice();
|
||||
purchaseCurrency = product.getPurchaseCurrency();
|
||||
}
|
||||
}
|
||||
|
||||
BigDecimal price =
|
||||
(product.getInAti() == resultInAti)
|
||||
? purchasePrice
|
||||
: this.convertUnitPrice(product.getInAti(), taxLine, purchasePrice);
|
||||
|
||||
return currencyService
|
||||
.getAmountCurrencyConvertedAtDate(
|
||||
purchaseCurrency, purchaseOrder.getCurrency(), price, purchaseOrder.getOrderDate())
|
||||
.setScale(appBaseService.getNbDecimalDigitForUnitPrice(), RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
public PurchaseOrderLine fill(PurchaseOrderLine line, PurchaseOrder purchaseOrder)
|
||||
throws AxelorException {
|
||||
Preconditions.checkNotNull(line, I18n.get("The line cannot be null."));
|
||||
Preconditions.checkNotNull(
|
||||
purchaseOrder, I18n.get("You need a purchase order associated to line."));
|
||||
Partner supplierPartner = purchaseOrder.getSupplierPartner();
|
||||
Product product = line.getProduct();
|
||||
|
||||
String[] productSupplierInfos = getProductSupplierInfos(purchaseOrder, line);
|
||||
line.setProductName(productSupplierInfos[0]);
|
||||
line.setProductCode(productSupplierInfos[1]);
|
||||
line.setUnit(getPurchaseUnit(line));
|
||||
line.setQty(getQty(purchaseOrder, line));
|
||||
|
||||
if (appPurchaseService.getAppPurchase().getIsEnabledProductDescriptionCopy()) {
|
||||
line.setDescription(product.getDescription());
|
||||
}
|
||||
|
||||
TaxLine taxLine = getTaxLine(purchaseOrder, line);
|
||||
line.setTaxLine(taxLine);
|
||||
|
||||
BigDecimal price = getExTaxUnitPrice(purchaseOrder, line, taxLine);
|
||||
BigDecimal inTaxPrice = getInTaxUnitPrice(purchaseOrder, line, taxLine);
|
||||
|
||||
if (price == null || inTaxPrice == null) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.TYPE_FUNCTIONNAL,
|
||||
I18n.get(IExceptionMessage.PURCHASE_ORDER_LINE_NO_SUPPLIER_CATALOG));
|
||||
}
|
||||
|
||||
Tax tax =
|
||||
accountManagementService.getProductTax(
|
||||
product, purchaseOrder.getCompany(), supplierPartner.getFiscalPosition(), true);
|
||||
|
||||
TaxEquiv taxEquiv =
|
||||
Beans.get(FiscalPositionService.class)
|
||||
.getTaxEquiv(supplierPartner.getFiscalPosition(), tax);
|
||||
line.setTaxEquiv(taxEquiv);
|
||||
|
||||
Map<String, Object> discounts =
|
||||
getDiscountsFromPriceLists(
|
||||
purchaseOrder, line, purchaseOrder.getInAti() ? inTaxPrice : price);
|
||||
|
||||
if (discounts != null) {
|
||||
if (discounts.get("price") != null) {
|
||||
BigDecimal discountPrice = (BigDecimal) discounts.get("price");
|
||||
if (product.getInAti()) {
|
||||
inTaxPrice = discountPrice;
|
||||
price = this.convertUnitPrice(true, line.getTaxLine(), discountPrice);
|
||||
} else {
|
||||
price = discountPrice;
|
||||
inTaxPrice = this.convertUnitPrice(false, line.getTaxLine(), discountPrice);
|
||||
}
|
||||
}
|
||||
if (product.getInAti() != purchaseOrder.getInAti()
|
||||
&& (Integer) discounts.get("discountTypeSelect")
|
||||
!= PriceListLineRepository.AMOUNT_TYPE_PERCENT) {
|
||||
line.setDiscountAmount(
|
||||
this.convertUnitPrice(
|
||||
product.getInAti(),
|
||||
line.getTaxLine(),
|
||||
(BigDecimal) discounts.get("discountAmount")));
|
||||
} else {
|
||||
line.setDiscountAmount((BigDecimal) discounts.get("discountAmount"));
|
||||
}
|
||||
line.setDiscountTypeSelect((Integer) discounts.get("discountTypeSelect"));
|
||||
}
|
||||
|
||||
line.setPrice(price);
|
||||
line.setInTaxPrice(inTaxPrice);
|
||||
|
||||
line.setSaleMinPrice(getMinSalePrice(purchaseOrder, line));
|
||||
line.setSalePrice(
|
||||
getSalePrice(
|
||||
purchaseOrder, line.getProduct(), purchaseOrder.getInAti() ? inTaxPrice : price));
|
||||
|
||||
return line;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseOrderLine reset(PurchaseOrderLine line) {
|
||||
line.setTaxLine(null);
|
||||
line.setProductName(null);
|
||||
line.setUnit(null);
|
||||
line.setDiscountAmount(null);
|
||||
line.setDiscountTypeSelect(PriceListLineRepository.AMOUNT_TYPE_NONE);
|
||||
line.setPrice(null);
|
||||
line.setInTaxPrice(null);
|
||||
line.setSaleMinPrice(null);
|
||||
line.setSalePrice(null);
|
||||
line.setExTaxTotal(null);
|
||||
line.setInTaxTotal(null);
|
||||
line.setCompanyInTaxTotal(null);
|
||||
line.setCompanyExTaxTotal(null);
|
||||
line.setProductCode(null);
|
||||
line.setQty(BigDecimal.ZERO);
|
||||
if (appPurchaseService.getAppPurchase().getIsEnabledProductDescriptionCopy()) {
|
||||
line.setDescription(null);
|
||||
}
|
||||
return line;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getMinSalePrice(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine) throws AxelorException {
|
||||
|
||||
try {
|
||||
|
||||
Product product = purchaseOrderLine.getProduct();
|
||||
|
||||
if (product == null || !product.getSellable()) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
TaxLine saleTaxLine =
|
||||
accountManagementService.getTaxLine(
|
||||
purchaseOrder.getOrderDate(),
|
||||
purchaseOrderLine.getProduct(),
|
||||
purchaseOrder.getCompany(),
|
||||
purchaseOrder.getSupplierPartner().getFiscalPosition(),
|
||||
false);
|
||||
|
||||
BigDecimal price;
|
||||
if (purchaseOrder.getInAti() != product.getInAti()) {
|
||||
price = this.convertUnitPrice(product.getInAti(), saleTaxLine, product.getSalePrice());
|
||||
} else {
|
||||
price = product.getSalePrice();
|
||||
}
|
||||
|
||||
return currencyService
|
||||
.getAmountCurrencyConvertedAtDate(
|
||||
product.getSaleCurrency(),
|
||||
purchaseOrder.getCurrency(),
|
||||
price,
|
||||
purchaseOrder.getOrderDate())
|
||||
.setScale(appBaseService.getNbDecimalDigitForUnitPrice(), RoundingMode.HALF_UP);
|
||||
|
||||
} catch (Exception e) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getSalePrice(PurchaseOrder purchaseOrder, Product product, BigDecimal price)
|
||||
throws AxelorException {
|
||||
|
||||
if (product == null || !product.getSellable()) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
price = price.multiply(product.getManagPriceCoef());
|
||||
|
||||
return currencyService
|
||||
.getAmountCurrencyConvertedAtDate(
|
||||
product.getSaleCurrency(),
|
||||
purchaseOrder.getCurrency(),
|
||||
price,
|
||||
purchaseOrder.getOrderDate())
|
||||
.setScale(appBaseService.getNbDecimalDigitForUnitPrice(), RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaxLine getTaxLine(PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine)
|
||||
throws AxelorException {
|
||||
|
||||
return accountManagementService.getTaxLine(
|
||||
purchaseOrder.getOrderDate(),
|
||||
purchaseOrderLine.getProduct(),
|
||||
purchaseOrder.getCompany(),
|
||||
purchaseOrder.getSupplierPartner().getFiscalPosition(),
|
||||
true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<TaxLine> getOptionalTaxLine(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine) {
|
||||
try {
|
||||
return Optional.of(getTaxLine(purchaseOrder, purchaseOrderLine));
|
||||
} catch (AxelorException e) {
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal computePurchaseOrderLine(PurchaseOrderLine purchaseOrderLine) {
|
||||
|
||||
return purchaseOrderLine.getExTaxTotal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getCompanyExTaxTotal(BigDecimal exTaxTotal, PurchaseOrder purchaseOrder)
|
||||
throws AxelorException {
|
||||
|
||||
return currencyService
|
||||
.getAmountCurrencyConvertedAtDate(
|
||||
purchaseOrder.getCurrency(),
|
||||
purchaseOrder.getCompany().getCurrency(),
|
||||
exTaxTotal,
|
||||
purchaseOrder.getOrderDate())
|
||||
.setScale(AppBaseService.DEFAULT_NB_DECIMAL_DIGITS_SUPPLIER_LINE, RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PriceListLine getPriceListLine(
|
||||
PurchaseOrderLine purchaseOrderLine, PriceList priceList, BigDecimal price) {
|
||||
|
||||
return priceListService.getPriceListLine(
|
||||
purchaseOrderLine.getProduct(), purchaseOrderLine.getQty(), priceList, price);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal computeDiscount(PurchaseOrderLine purchaseOrderLine, Boolean inAti) {
|
||||
|
||||
BigDecimal price = inAti ? purchaseOrderLine.getInTaxPrice() : purchaseOrderLine.getPrice();
|
||||
|
||||
return priceListService.computeDiscount(
|
||||
price, purchaseOrderLine.getDiscountTypeSelect(), purchaseOrderLine.getDiscountAmount());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseOrderLine createPurchaseOrderLine(
|
||||
PurchaseOrder purchaseOrder,
|
||||
Product product,
|
||||
String productName,
|
||||
String description,
|
||||
BigDecimal qty,
|
||||
Unit unit)
|
||||
throws AxelorException {
|
||||
|
||||
PurchaseOrderLine purchaseOrderLine = new PurchaseOrderLine();
|
||||
purchaseOrderLine.setPurchaseOrder(purchaseOrder);
|
||||
|
||||
purchaseOrderLine.setEstimatedDelivDate(purchaseOrder.getDeliveryDate());
|
||||
purchaseOrderLine.setDescription(description);
|
||||
|
||||
purchaseOrderLine.setIsOrdered(false);
|
||||
|
||||
purchaseOrderLine.setQty(qty);
|
||||
purchaseOrderLine.setSequence(sequence);
|
||||
sequence++;
|
||||
|
||||
purchaseOrderLine.setUnit(unit);
|
||||
purchaseOrderLine.setProductName(productName);
|
||||
|
||||
if (product == null) {
|
||||
return purchaseOrderLine;
|
||||
}
|
||||
|
||||
purchaseOrderLine.setProduct(product);
|
||||
|
||||
if (productName == null) {
|
||||
purchaseOrderLine.setProductName(product.getName());
|
||||
}
|
||||
|
||||
TaxLine taxLine = this.getTaxLine(purchaseOrder, purchaseOrderLine);
|
||||
purchaseOrderLine.setTaxLine(taxLine);
|
||||
|
||||
BigDecimal price = this.getExTaxUnitPrice(purchaseOrder, purchaseOrderLine, taxLine);
|
||||
BigDecimal inTaxPrice = this.getInTaxUnitPrice(purchaseOrder, purchaseOrderLine, taxLine);
|
||||
|
||||
Map<String, Object> discounts =
|
||||
this.getDiscountsFromPriceLists(
|
||||
purchaseOrder, purchaseOrderLine, product.getInAti() ? inTaxPrice : price);
|
||||
|
||||
if (discounts != null) {
|
||||
if (discounts.get("price") != null) {
|
||||
BigDecimal discountPrice = (BigDecimal) discounts.get("price");
|
||||
if (purchaseOrderLine.getProduct().getInAti()) {
|
||||
inTaxPrice = discountPrice;
|
||||
price = this.convertUnitPrice(true, purchaseOrderLine.getTaxLine(), discountPrice);
|
||||
} else {
|
||||
price = discountPrice;
|
||||
inTaxPrice = this.convertUnitPrice(false, purchaseOrderLine.getTaxLine(), discountPrice);
|
||||
}
|
||||
}
|
||||
if (purchaseOrderLine.getProduct().getInAti() != purchaseOrder.getInAti()) {
|
||||
purchaseOrderLine.setDiscountAmount(
|
||||
this.convertUnitPrice(
|
||||
purchaseOrderLine.getProduct().getInAti(),
|
||||
purchaseOrderLine.getTaxLine(),
|
||||
(BigDecimal) discounts.get("discountAmount")));
|
||||
} else {
|
||||
purchaseOrderLine.setDiscountAmount((BigDecimal) discounts.get("discountAmount"));
|
||||
}
|
||||
purchaseOrderLine.setDiscountTypeSelect((Integer) discounts.get("discountTypeSelect"));
|
||||
}
|
||||
|
||||
purchaseOrderLine.setPrice(price);
|
||||
purchaseOrderLine.setInTaxPrice(inTaxPrice);
|
||||
|
||||
BigDecimal priceDiscounted = this.computeDiscount(purchaseOrderLine, purchaseOrder.getInAti());
|
||||
purchaseOrderLine.setPriceDiscounted(priceDiscounted);
|
||||
|
||||
BigDecimal exTaxTotal, inTaxTotal, companyExTaxTotal, companyInTaxTotal;
|
||||
|
||||
if (!purchaseOrder.getInAti()) {
|
||||
exTaxTotal = computeAmount(purchaseOrderLine.getQty(), priceDiscounted);
|
||||
inTaxTotal = exTaxTotal.add(exTaxTotal.multiply(purchaseOrderLine.getTaxLine().getValue()));
|
||||
companyExTaxTotal = this.getCompanyExTaxTotal(exTaxTotal, purchaseOrder);
|
||||
companyInTaxTotal =
|
||||
companyExTaxTotal.add(
|
||||
companyExTaxTotal.multiply(purchaseOrderLine.getTaxLine().getValue()));
|
||||
|
||||
} else {
|
||||
inTaxTotal = computeAmount(purchaseOrderLine.getQty(), priceDiscounted);
|
||||
exTaxTotal =
|
||||
inTaxTotal.divide(
|
||||
purchaseOrderLine.getTaxLine().getValue().add(BigDecimal.ONE),
|
||||
2,
|
||||
BigDecimal.ROUND_HALF_UP);
|
||||
companyInTaxTotal = this.getCompanyExTaxTotal(inTaxTotal, purchaseOrder);
|
||||
companyExTaxTotal =
|
||||
companyInTaxTotal.divide(
|
||||
purchaseOrderLine.getTaxLine().getValue().add(BigDecimal.ONE),
|
||||
2,
|
||||
BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
purchaseOrderLine.setExTaxTotal(exTaxTotal);
|
||||
purchaseOrderLine.setCompanyExTaxTotal(companyExTaxTotal);
|
||||
purchaseOrderLine.setCompanyInTaxTotal(companyInTaxTotal);
|
||||
purchaseOrderLine.setInTaxTotal(inTaxTotal);
|
||||
|
||||
return purchaseOrderLine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getQty(PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine) {
|
||||
|
||||
SupplierCatalog supplierCatalog = this.getSupplierCatalog(purchaseOrder, purchaseOrderLine);
|
||||
|
||||
if (supplierCatalog != null) {
|
||||
|
||||
return supplierCatalog.getMinQty();
|
||||
}
|
||||
|
||||
return BigDecimal.ONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SupplierCatalog getSupplierCatalog(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine) {
|
||||
|
||||
Product product = purchaseOrderLine.getProduct();
|
||||
|
||||
SupplierCatalog supplierCatalog =
|
||||
supplierCatalogService.getSupplierCatalog(product, purchaseOrder.getSupplierPartner());
|
||||
|
||||
// If there is no catalog for supplier, then we don't take the default catalog.
|
||||
|
||||
// if(supplierCatalog == null) {
|
||||
//
|
||||
// supplierCatalog = this.getSupplierCatalog(product, product.getDefaultSupplierPartner());
|
||||
// }
|
||||
|
||||
return supplierCatalog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal convertUnitPrice(Boolean priceIsAti, TaxLine taxLine, BigDecimal price) {
|
||||
|
||||
if (taxLine == null) {
|
||||
return price;
|
||||
}
|
||||
|
||||
if (priceIsAti) {
|
||||
price = price.divide(taxLine.getValue().add(BigDecimal.ONE), 2, BigDecimal.ROUND_HALF_UP);
|
||||
} else {
|
||||
price = price.add(price.multiply(taxLine.getValue()));
|
||||
}
|
||||
return price;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> updateInfoFromCatalog(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine) throws AxelorException {
|
||||
return supplierCatalogService.updateInfoFromCatalog(
|
||||
purchaseOrderLine.getProduct(),
|
||||
purchaseOrderLine.getQty(),
|
||||
purchaseOrder.getSupplierPartner(),
|
||||
purchaseOrder.getCurrency(),
|
||||
purchaseOrder.getOrderDate());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getDiscountsFromPriceLists(
|
||||
PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine, BigDecimal price) {
|
||||
|
||||
Map<String, Object> discounts = null;
|
||||
|
||||
PriceList priceList = purchaseOrder.getPriceList();
|
||||
|
||||
if (priceList != null) {
|
||||
PriceListLine priceListLine = this.getPriceListLine(purchaseOrderLine, priceList, price);
|
||||
discounts = priceListService.getReplacedPriceAndDiscounts(priceList, priceListLine, price);
|
||||
}
|
||||
|
||||
return discounts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDiscountTypeSelect(
|
||||
PurchaseOrderLine purchaseOrderLine, PurchaseOrder purchaseOrder, BigDecimal price) {
|
||||
PriceList priceList = purchaseOrder.getPriceList();
|
||||
if (priceList != null) {
|
||||
PriceListLine priceListLine = this.getPriceListLine(purchaseOrderLine, priceList, price);
|
||||
|
||||
return priceListLine.getTypeSelect();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Unit getPurchaseUnit(PurchaseOrderLine purchaseOrderLine) {
|
||||
Unit unit = purchaseOrderLine.getProduct().getPurchasesUnit();
|
||||
if (unit == null) {
|
||||
unit = purchaseOrderLine.getProduct().getUnit();
|
||||
}
|
||||
return unit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getMinQty(PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine) {
|
||||
SupplierCatalog supplierCatalog = getSupplierCatalog(purchaseOrder, purchaseOrderLine);
|
||||
return supplierCatalog != null ? supplierCatalog.getMinQty() : BigDecimal.ONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkMinQty(
|
||||
PurchaseOrder purchaseOrder,
|
||||
PurchaseOrderLine purchaseOrderLine,
|
||||
ActionRequest request,
|
||||
ActionResponse response) {
|
||||
|
||||
BigDecimal minQty = this.getMinQty(purchaseOrder, purchaseOrderLine);
|
||||
|
||||
if (purchaseOrderLine.getQty().compareTo(minQty) < 0) {
|
||||
String msg = String.format(I18n.get(IExceptionMessage.PURCHASE_ORDER_LINE_MIN_QTY), minQty);
|
||||
|
||||
if (request.getAction().endsWith("onchange")) {
|
||||
response.setFlash(msg);
|
||||
}
|
||||
|
||||
String title = ContextTool.formatLabel(msg, ContextTool.SPAN_CLASS_WARNING, 75);
|
||||
|
||||
response.setAttr("minQtyNotRespectedLabel", "title", title);
|
||||
response.setAttr("minQtyNotRespectedLabel", "hidden", false);
|
||||
|
||||
} else {
|
||||
response.setAttr("minQtyNotRespectedLabel", "hidden", true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkMultipleQty(PurchaseOrderLine purchaseOrderLine, ActionResponse response) {
|
||||
|
||||
Product product = purchaseOrderLine.getProduct();
|
||||
|
||||
if (product == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
productMultipleQtyService.checkMultipleQty(
|
||||
purchaseOrderLine.getQty(),
|
||||
product.getPurchaseProductMultipleQtyList(),
|
||||
product.getAllowToForcePurchaseQty(),
|
||||
response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseOrderLine createPurchaseOrderLine(PurchaseOrder purchaseOrder, Product product, String productName,
|
||||
String description, BigDecimal qty, Unit unit, PurchaseRequestLine purchaseRequestLine) throws AxelorException {
|
||||
PurchaseOrderLine purchaseOrderLine = this.createPurchaseOrderLine(purchaseOrder, product, productName, description, qty, unit);
|
||||
return purchaseOrderLine;
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.account.db.TaxEquiv;
|
||||
import com.axelor.apps.account.db.TaxLine;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLine;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLineTax;
|
||||
import com.google.inject.Inject;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class PurchaseOrderLineTaxService {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
@Inject private PurchaseOrderToolService purchaseOrderToolService;
|
||||
|
||||
/**
|
||||
* Créer les lignes de TVA de la commande. La création des lignes de TVA se basent sur les lignes
|
||||
* de commande.
|
||||
*
|
||||
* @param purchaseOrder La commande.
|
||||
* @param purchaseOrderLineList Les lignes de commandes.
|
||||
* @return La liste des lignes de TVA de la commande.
|
||||
*/
|
||||
public List<PurchaseOrderLineTax> createsPurchaseOrderLineTax(
|
||||
PurchaseOrder purchaseOrder, List<PurchaseOrderLine> purchaseOrderLineList) {
|
||||
|
||||
List<PurchaseOrderLineTax> purchaseOrderLineTaxList = new ArrayList<PurchaseOrderLineTax>();
|
||||
Map<TaxLine, PurchaseOrderLineTax> map = new HashMap<TaxLine, PurchaseOrderLineTax>();
|
||||
|
||||
if (purchaseOrderLineList != null && !purchaseOrderLineList.isEmpty()) {
|
||||
|
||||
LOG.debug("Création des lignes de tva pour les lignes de commande.");
|
||||
|
||||
for (PurchaseOrderLine purchaseOrderLine : purchaseOrderLineList) {
|
||||
|
||||
TaxLine taxLine = purchaseOrderLine.getTaxLine();
|
||||
TaxEquiv taxEquiv = purchaseOrderLine.getTaxEquiv();
|
||||
TaxLine taxLineRC =
|
||||
(taxEquiv != null
|
||||
&& taxEquiv.getReverseCharge()
|
||||
&& taxEquiv.getReverseChargeTax() != null)
|
||||
? taxEquiv.getReverseChargeTax().getActiveTaxLine()
|
||||
: null;
|
||||
|
||||
if (taxLine != null) {
|
||||
LOG.debug("TVA {}", taxLine);
|
||||
|
||||
if (map.containsKey(taxLine)) {
|
||||
|
||||
PurchaseOrderLineTax purchaseOrderLineVat = map.get(taxLine);
|
||||
|
||||
purchaseOrderLineVat.setExTaxBase(
|
||||
purchaseOrderLineVat.getExTaxBase().add(purchaseOrderLine.getExTaxTotal()));
|
||||
|
||||
purchaseOrderLineVat.setReverseCharged(false);
|
||||
|
||||
} else {
|
||||
|
||||
PurchaseOrderLineTax purchaseOrderLineTax = new PurchaseOrderLineTax();
|
||||
purchaseOrderLineTax.setPurchaseOrder(purchaseOrder);
|
||||
|
||||
purchaseOrderLineTax.setExTaxBase(purchaseOrderLine.getExTaxTotal());
|
||||
|
||||
purchaseOrderLineTax.setReverseCharged(false);
|
||||
|
||||
purchaseOrderLineTax.setTaxLine(taxLine);
|
||||
map.put(taxLine, purchaseOrderLineTax);
|
||||
}
|
||||
}
|
||||
|
||||
if (taxLineRC != null) {
|
||||
LOG.debug("TVA {}", taxLineRC);
|
||||
|
||||
if (map.containsKey(taxLineRC)) {
|
||||
|
||||
PurchaseOrderLineTax purchaseOrderLineRC =
|
||||
map.get(taxEquiv.getReverseChargeTax().getActiveTaxLine());
|
||||
|
||||
purchaseOrderLineRC.setExTaxBase(
|
||||
purchaseOrderLineRC.getExTaxBase().add(purchaseOrderLine.getExTaxTotal()));
|
||||
|
||||
purchaseOrderLineRC.setReverseCharged(true);
|
||||
|
||||
} else {
|
||||
|
||||
PurchaseOrderLineTax purchaseOrderLineTaxRC = new PurchaseOrderLineTax();
|
||||
purchaseOrderLineTaxRC.setPurchaseOrder(purchaseOrder);
|
||||
|
||||
purchaseOrderLineTaxRC.setExTaxBase(purchaseOrderLine.getExTaxTotal());
|
||||
|
||||
purchaseOrderLineTaxRC.setReverseCharged(true);
|
||||
|
||||
purchaseOrderLineTaxRC.setTaxLine(taxLineRC);
|
||||
map.put(taxLineRC, purchaseOrderLineTaxRC);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (PurchaseOrderLineTax purchaseOrderLineTax : map.values()) {
|
||||
|
||||
// Dans la devise de la commande
|
||||
BigDecimal exTaxBase =
|
||||
(purchaseOrderLineTax.getReverseCharged())
|
||||
? purchaseOrderLineTax.getExTaxBase().negate()
|
||||
: purchaseOrderLineTax.getExTaxBase();
|
||||
BigDecimal taxTotal = BigDecimal.ZERO;
|
||||
if (purchaseOrderLineTax.getTaxLine() != null)
|
||||
taxTotal =
|
||||
purchaseOrderToolService.computeAmount(
|
||||
exTaxBase, purchaseOrderLineTax.getTaxLine().getValue());
|
||||
purchaseOrderLineTax.setTaxTotal(taxTotal);
|
||||
purchaseOrderLineTax.setInTaxTotal(purchaseOrderLineTax.getExTaxBase().add(taxTotal));
|
||||
|
||||
purchaseOrderLineTaxList.add(purchaseOrderLineTax);
|
||||
|
||||
LOG.debug(
|
||||
"Ligne de TVA : Total TVA => {}, Total HT => {}",
|
||||
new Object[] {purchaseOrderLineTax.getTaxTotal(), purchaseOrderLineTax.getInTaxTotal()});
|
||||
}
|
||||
|
||||
return purchaseOrderLineTaxList;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.base.db.CancelReason;
|
||||
import com.axelor.apps.base.db.Company;
|
||||
import com.axelor.apps.base.db.Currency;
|
||||
import com.axelor.apps.base.db.Partner;
|
||||
import com.axelor.apps.base.db.PriceList;
|
||||
import com.axelor.apps.base.db.TradingName;
|
||||
import com.axelor.apps.purchase.db.ImportationFolder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.auth.db.User;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.google.inject.persist.Transactional;
|
||||
import java.net.MalformedURLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import wslite.json.JSONException;
|
||||
|
||||
public interface PurchaseOrderService {
|
||||
|
||||
PurchaseOrder _computePurchaseOrderLines(PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
PurchaseOrder computePurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Peupler une commande.
|
||||
*
|
||||
* <p>Cette fonction permet de déterminer les tva d'une commande à partir des lignes de factures
|
||||
* passées en paramètres.
|
||||
*
|
||||
* @param purchaseOrder
|
||||
* @throws AxelorException
|
||||
*/
|
||||
void _populatePurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Calculer le montant d'une commande.
|
||||
*
|
||||
* <p>Le calcul est basé sur les lignes de TVA préalablement créées.
|
||||
*
|
||||
* @param purchaseOrder
|
||||
* @throws AxelorException
|
||||
*/
|
||||
void _computePurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Permet de réinitialiser la liste des lignes de TVA
|
||||
*
|
||||
* @param purchaseOrder Une commande.
|
||||
*/
|
||||
void initPurchaseOrderLineTax(PurchaseOrder purchaseOrder);
|
||||
|
||||
PurchaseOrder createPurchaseOrder(
|
||||
User buyerUser,
|
||||
Company company,
|
||||
Partner contactPartner,
|
||||
Currency currency,
|
||||
LocalDate deliveryDate,
|
||||
String internalReference,
|
||||
String externalReference,
|
||||
String notes,
|
||||
LocalDate orderDate,
|
||||
PriceList priceList,
|
||||
Partner supplierPartner,
|
||||
TradingName tradingName)
|
||||
throws AxelorException;
|
||||
|
||||
String getSequence(Company company) throws AxelorException;
|
||||
|
||||
public void setDraftSequence(PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
|
||||
@Transactional
|
||||
public Partner validateSupplier(PurchaseOrder purchaseOrder);
|
||||
|
||||
public void savePurchaseOrderPDFAsAttachment(PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
|
||||
public void requestPurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
|
||||
public PurchaseOrder mergePurchaseOrders(
|
||||
List<PurchaseOrder> purchaseOrderList,
|
||||
Currency currency,
|
||||
Partner supplierPartner,
|
||||
Company company,
|
||||
Partner contactPartner,
|
||||
PriceList priceList,
|
||||
TradingName tradingName)
|
||||
throws AxelorException;
|
||||
|
||||
public void updateCostPrice(PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
|
||||
public void draftPurchaseOrder(PurchaseOrder purchaseOrder);
|
||||
|
||||
public void validatePurchaseOrder(PurchaseOrder purchaseOrder)
|
||||
throws AxelorException, MalformedURLException, JSONException;
|
||||
|
||||
public void checkTcoToApprove(PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
|
||||
public void finishPurchaseOrder(PurchaseOrder purchaseOrder, String cancelReasonStr);
|
||||
|
||||
public void setStandByPurchaseOrder(PurchaseOrder purchaseOrder, String standByReasonStr);
|
||||
|
||||
public void cancelPurchaseOrder(PurchaseOrder purchaseOrder);
|
||||
|
||||
public void cancelReasonPurchaseOrder(
|
||||
PurchaseOrder purchaseOrder, CancelReason cancelReason, String cancelReasonStr);
|
||||
|
||||
public void calculateSum(List<PurchaseOrder> purchaseOrders, ImportationFolder importationFolder)
|
||||
throws AxelorException;
|
||||
|
||||
void setPurchaseOrderBarCodeSeq(PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
|
||||
void createPurchaseOrderBarCodeSeq(PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
}
|
||||
@ -0,0 +1,874 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.ReportFactory;
|
||||
import com.axelor.apps.account.db.TaxLine;
|
||||
import com.axelor.apps.account.db.repo.TaxLineRepository;
|
||||
import com.axelor.apps.base.db.Blocking;
|
||||
import com.axelor.apps.base.db.CancelReason;
|
||||
import com.axelor.apps.base.db.Company;
|
||||
import com.axelor.apps.base.db.Currency;
|
||||
import com.axelor.apps.base.db.Partner;
|
||||
import com.axelor.apps.base.db.PriceList;
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.base.db.TradingName;
|
||||
import com.axelor.apps.base.db.Unit;
|
||||
import com.axelor.apps.base.db.repo.BlockingRepository;
|
||||
import com.axelor.apps.base.db.repo.CurrencyRepository;
|
||||
import com.axelor.apps.base.db.repo.PartnerRepository;
|
||||
import com.axelor.apps.base.db.repo.ProductRepository;
|
||||
import com.axelor.apps.base.db.repo.SequenceRepository;
|
||||
import com.axelor.apps.base.db.repo.UnitRepository;
|
||||
import com.axelor.apps.base.service.BarcodeGeneratorService;
|
||||
import com.axelor.apps.base.service.BlockingService;
|
||||
import com.axelor.apps.base.service.CurrencyService;
|
||||
import com.axelor.apps.base.service.ProductService;
|
||||
import com.axelor.apps.base.service.ShippingCoefService;
|
||||
import com.axelor.apps.base.service.TradingNameService;
|
||||
import com.axelor.apps.base.service.UnitConversionService;
|
||||
import com.axelor.apps.base.service.administration.SequenceService;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.purchase.db.ImportationFolder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLine;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLineTax;
|
||||
import com.axelor.apps.purchase.db.PurchaseRequest;
|
||||
import com.axelor.apps.purchase.db.repo.ImportationFolderRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderLineRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseRequestRepository;
|
||||
import com.axelor.apps.purchase.exception.IExceptionMessage;
|
||||
import com.axelor.apps.purchase.report.IReport;
|
||||
import com.axelor.apps.purchase.service.app.AppPurchaseService;
|
||||
import com.axelor.apps.report.engine.ReportSettings;
|
||||
import com.axelor.auth.AuthUtils;
|
||||
import com.axelor.auth.db.User;
|
||||
import com.axelor.dms.db.DMSFile;
|
||||
import com.axelor.dms.db.repo.DMSFileRepository;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.exception.db.repo.TraceBackRepository;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.meta.MetaFiles;
|
||||
import com.axelor.meta.db.MetaFile;
|
||||
import com.axelor.meta.db.repo.MetaAttachmentRepository;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.persist.Transactional;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.net.MalformedURLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.validation.ValidationException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import wslite.json.JSONException;
|
||||
|
||||
public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
@Inject protected PurchaseOrderLineTaxService purchaseOrderLineVatService;
|
||||
|
||||
@Inject protected SequenceService sequenceService;
|
||||
|
||||
@Inject protected PartnerRepository partnerRepo;
|
||||
|
||||
@Inject protected AppPurchaseService appPurchaseService;
|
||||
|
||||
@Inject protected PurchaseOrderRepository purchaseOrderRepo;
|
||||
@Inject protected ImportationFolderRepository importationFolderRepo;
|
||||
|
||||
@Inject protected BarcodeGeneratorService barcodeGeneratorService;
|
||||
@Inject protected AppBaseService appBaseService;
|
||||
@Inject private MetaFiles metaFiles;
|
||||
|
||||
@Inject private PurchaseRequestRepository purchaseRequestRepo;
|
||||
|
||||
@Inject private MetaAttachmentRepository metaAttachmentRepository;
|
||||
|
||||
@Inject private DMSFileRepository dmsFileRepository;
|
||||
|
||||
@Override
|
||||
public PurchaseOrder _computePurchaseOrderLines(PurchaseOrder purchaseOrder)
|
||||
throws AxelorException {
|
||||
|
||||
if (purchaseOrder.getPurchaseOrderLineList() != null) {
|
||||
PurchaseOrderLineService purchaseOrderLineService = Beans.get(PurchaseOrderLineService.class);
|
||||
for (PurchaseOrderLine purchaseOrderLine : purchaseOrder.getPurchaseOrderLineList()) {
|
||||
purchaseOrderLine.setExTaxTotal(
|
||||
purchaseOrderLineService.computePurchaseOrderLine(purchaseOrderLine));
|
||||
purchaseOrderLine.setCompanyExTaxTotal(
|
||||
purchaseOrderLineService.getCompanyExTaxTotal(
|
||||
purchaseOrderLine.getExTaxTotal(), purchaseOrder));
|
||||
}
|
||||
}
|
||||
|
||||
return purchaseOrder;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public PurchaseOrder computePurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
|
||||
this.initPurchaseOrderLineTax(purchaseOrder);
|
||||
|
||||
this._computePurchaseOrderLines(purchaseOrder);
|
||||
|
||||
this._populatePurchaseOrder(purchaseOrder);
|
||||
|
||||
this._computePurchaseOrder(purchaseOrder);
|
||||
|
||||
return purchaseOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Peupler une commande.
|
||||
*
|
||||
* <p>Cette fonction permet de déterminer les tva d'une commande à partir des lignes de factures
|
||||
* passées en paramètres.
|
||||
*
|
||||
* @param purchaseOrder
|
||||
* @throws AxelorException
|
||||
*/
|
||||
@Override
|
||||
public void _populatePurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
|
||||
logger.debug(
|
||||
"Peupler une facture => lignes de devis: {} ",
|
||||
new Object[] {purchaseOrder.getPurchaseOrderLineList().size()});
|
||||
|
||||
// create Tva lines
|
||||
purchaseOrder
|
||||
.getPurchaseOrderLineTaxList()
|
||||
.addAll(
|
||||
purchaseOrderLineVatService.createsPurchaseOrderLineTax(
|
||||
purchaseOrder, purchaseOrder.getPurchaseOrderLineList()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the purchase order total amounts
|
||||
*
|
||||
* @param purchaseOrder
|
||||
* @throws AxelorException
|
||||
*/
|
||||
@Override
|
||||
public void _computePurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
|
||||
purchaseOrder.setExTaxTotal(BigDecimal.ZERO);
|
||||
purchaseOrder.setCompanyExTaxTotal(BigDecimal.ZERO);
|
||||
purchaseOrder.setTaxTotal(BigDecimal.ZERO);
|
||||
purchaseOrder.setInTaxTotal(BigDecimal.ZERO);
|
||||
|
||||
for (PurchaseOrderLine purchaseOrderLine : purchaseOrder.getPurchaseOrderLineList()) {
|
||||
purchaseOrder.setExTaxTotal(
|
||||
purchaseOrder.getExTaxTotal().add(purchaseOrderLine.getExTaxTotal()));
|
||||
|
||||
// In the company accounting currency
|
||||
purchaseOrder.setCompanyExTaxTotal(
|
||||
purchaseOrder.getCompanyExTaxTotal().add(purchaseOrderLine.getCompanyExTaxTotal()));
|
||||
}
|
||||
|
||||
for (PurchaseOrderLineTax purchaseOrderLineVat : purchaseOrder.getPurchaseOrderLineTaxList()) {
|
||||
|
||||
// In the purchase order currency
|
||||
purchaseOrder.setTaxTotal(
|
||||
purchaseOrder.getTaxTotal().add(purchaseOrderLineVat.getTaxTotal()));
|
||||
}
|
||||
|
||||
purchaseOrder.setInTaxTotal(
|
||||
purchaseOrder
|
||||
.getExTaxTotal()
|
||||
.add(
|
||||
purchaseOrder
|
||||
.getTaxTotal()
|
||||
.add(purchaseOrder.getStamp().add(purchaseOrder.getFixTax()))));
|
||||
|
||||
logger.debug(
|
||||
"Montant de la facture: HTT = {}, HT = {}, TVA = {}, TTC = {}",
|
||||
new Object[] {
|
||||
purchaseOrder.getExTaxTotal(), purchaseOrder.getTaxTotal(), purchaseOrder.getInTaxTotal()
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Permet de réinitialiser la liste des lignes de TVA
|
||||
*
|
||||
* @param purchaseOrder Une commande.
|
||||
*/
|
||||
@Override
|
||||
public void initPurchaseOrderLineTax(PurchaseOrder purchaseOrder) {
|
||||
|
||||
if (purchaseOrder.getPurchaseOrderLineTaxList() == null) {
|
||||
purchaseOrder.setPurchaseOrderLineTaxList(new ArrayList<PurchaseOrderLineTax>());
|
||||
} else {
|
||||
purchaseOrder.getPurchaseOrderLineTaxList().clear();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseOrder createPurchaseOrder(
|
||||
User buyerUser,
|
||||
Company company,
|
||||
Partner contactPartner,
|
||||
Currency currency,
|
||||
LocalDate deliveryDate,
|
||||
String internalReference,
|
||||
String externalReference,
|
||||
String notes,
|
||||
LocalDate orderDate,
|
||||
PriceList priceList,
|
||||
Partner supplierPartner,
|
||||
TradingName tradingName)
|
||||
throws AxelorException {
|
||||
|
||||
logger.debug(
|
||||
"Création d'une commande fournisseur : Société = {}, Reference externe = {}, Fournisseur = {}",
|
||||
new Object[] {company.getName(), externalReference, supplierPartner.getFullName()});
|
||||
|
||||
PurchaseOrder purchaseOrder = new PurchaseOrder();
|
||||
purchaseOrder.setBuyerUser(buyerUser);
|
||||
purchaseOrder.setCompany(company);
|
||||
purchaseOrder.setContactPartner(contactPartner);
|
||||
purchaseOrder.setCurrency(currency);
|
||||
purchaseOrder.setDeliveryDate(deliveryDate);
|
||||
purchaseOrder.setInternalReference(internalReference);
|
||||
purchaseOrder.setExternalReference(externalReference);
|
||||
purchaseOrder.setNotes(notes);
|
||||
purchaseOrder.setOrderDate(orderDate);
|
||||
purchaseOrder.setPriceList(priceList);
|
||||
purchaseOrder.setTradingName(tradingName);
|
||||
purchaseOrder.setPurchaseOrderLineList(new ArrayList<>());
|
||||
|
||||
purchaseOrder.setPrintingSettings(
|
||||
Beans.get(TradingNameService.class).getDefaultPrintingSettings(null, company));
|
||||
|
||||
purchaseOrder.setPurchaseOrderSeq(this.getSequence(company));
|
||||
purchaseOrder.setStatusSelect(PurchaseOrderRepository.STATUS_DRAFT);
|
||||
purchaseOrder.setSupplierPartner(supplierPartner);
|
||||
purchaseOrder.setDisplayPriceOnQuotationRequest(true); // SOPHAL
|
||||
|
||||
return purchaseOrder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSequence(Company company) throws AxelorException {
|
||||
String seq = sequenceService.getSequenceNumber(SequenceRepository.PURCHASE_ORDER, company);
|
||||
if (seq == null) {
|
||||
throw new AxelorException(
|
||||
company,
|
||||
TraceBackRepository.CATEGORY_CONFIGURATION_ERROR,
|
||||
I18n.get(IExceptionMessage.PURCHASE_ORDER_1),
|
||||
company.getName());
|
||||
}
|
||||
return seq;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Partner validateSupplier(PurchaseOrder purchaseOrder) {
|
||||
|
||||
Partner supplierPartner = partnerRepo.find(purchaseOrder.getSupplierPartner().getId());
|
||||
supplierPartner.setIsSupplier(true);
|
||||
|
||||
return partnerRepo.save(supplierPartner);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void savePurchaseOrderPDFAsAttachment(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
if (purchaseOrder.getPrintingSettings() == null) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_MISSING_FIELD,
|
||||
String.format(
|
||||
I18n.get(IExceptionMessage.PURCHASE_ORDER_MISSING_PRINTING_SETTINGS),
|
||||
purchaseOrder.getPurchaseOrderSeq()));
|
||||
}
|
||||
|
||||
String language = ReportSettings.getPrintingLocale(purchaseOrder.getSupplierPartner());
|
||||
|
||||
String title =
|
||||
I18n.get("Purchase order")
|
||||
+ purchaseOrder.getPurchaseOrderSeq()
|
||||
+ ((purchaseOrder.getVersionNumber() > 1)
|
||||
? "-V" + purchaseOrder.getVersionNumber()
|
||||
: "");
|
||||
|
||||
ReportFactory.createReport(IReport.PURCHASE_ORDER, title + "-${date}")
|
||||
.addParam("PurchaseOrderId", purchaseOrder.getId())
|
||||
.addParam("Locale", language)
|
||||
.addParam("HeaderHeight", purchaseOrder.getPrintingSettings().getPdfHeaderHeight())
|
||||
.addParam("FooterHeight", purchaseOrder.getPrintingSettings().getPdfFooterHeight())
|
||||
.toAttach(purchaseOrder)
|
||||
.generate()
|
||||
.getFileLink();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public void requestPurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
|
||||
Boolean checkTcoEnabled = Beans.get(AppBaseService.class).getAppBase().getEnableCheckTco();
|
||||
|
||||
if (checkTcoEnabled
|
||||
&& !appPurchaseService
|
||||
.getAppPurchase()
|
||||
.getUsersExludedFromTco()
|
||||
.contains(AuthUtils.getUser())) {
|
||||
this.checkTcoToApprove(purchaseOrder);
|
||||
}
|
||||
|
||||
purchaseOrder.setStatusSelect(PurchaseOrderRepository.STATUS_REQUESTED);
|
||||
Partner partner = purchaseOrder.getSupplierPartner();
|
||||
Company company = purchaseOrder.getCompany();
|
||||
Blocking blocking =
|
||||
Beans.get(BlockingService.class)
|
||||
.getBlocking(partner, company, BlockingRepository.PURCHASE_BLOCKING);
|
||||
|
||||
if (blocking != null) {
|
||||
String reason =
|
||||
blocking.getBlockingReason() != null ? blocking.getBlockingReason().getName() : "";
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.TYPE_FUNCTIONNAL,
|
||||
I18n.get(IExceptionMessage.SUPPLIER_BLOCKED) + " " + reason,
|
||||
partner);
|
||||
}
|
||||
if (purchaseOrder.getVersionNumber() == 1
|
||||
&& sequenceService.isEmptyOrDraftSequenceNumber(purchaseOrder.getPurchaseOrderSeq())) {
|
||||
purchaseOrder.setPurchaseOrderSeq(this.getSequence(purchaseOrder.getCompany()));
|
||||
}
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
if (appPurchaseService.getAppPurchase().getManagePurchaseOrderVersion()) {
|
||||
this.savePurchaseOrderPDFAsAttachment(purchaseOrder);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public PurchaseOrder mergePurchaseOrders(
|
||||
List<PurchaseOrder> purchaseOrderList,
|
||||
Currency currency,
|
||||
Partner supplierPartner,
|
||||
Company company,
|
||||
Partner contactPartner,
|
||||
PriceList priceList,
|
||||
TradingName tradingName)
|
||||
throws AxelorException {
|
||||
|
||||
String numSeq = "";
|
||||
String externalRef = "";
|
||||
String description = "";
|
||||
int statusSelect = 1;
|
||||
|
||||
for (PurchaseOrder purchaseOrderLocal : purchaseOrderList) {
|
||||
if (!numSeq.isEmpty()) {
|
||||
numSeq += "-";
|
||||
}
|
||||
numSeq +=
|
||||
purchaseOrderLocal.getPurchaseOrderSeq()
|
||||
+ (purchaseOrderLocal.getInternalReference() == null
|
||||
? ""
|
||||
: purchaseOrderLocal.getInternalReference() + "-");
|
||||
|
||||
if (!externalRef.isEmpty()) {
|
||||
externalRef += "|";
|
||||
}
|
||||
if (purchaseOrderLocal.getExternalReference() != null) {
|
||||
externalRef += purchaseOrderLocal.getExternalReference();
|
||||
}
|
||||
if (purchaseOrderLocal.getNotes() != null) {
|
||||
description += purchaseOrderLocal.getNotes() + " ";
|
||||
}
|
||||
statusSelect = purchaseOrderLocal.getStatusSelect();
|
||||
}
|
||||
|
||||
PurchaseOrder purchaseOrderMerged =
|
||||
this.createPurchaseOrder(
|
||||
AuthUtils.getUser(),
|
||||
company,
|
||||
contactPartner,
|
||||
currency,
|
||||
null,
|
||||
numSeq,
|
||||
externalRef,
|
||||
description,
|
||||
LocalDate.now(),
|
||||
priceList,
|
||||
supplierPartner,
|
||||
tradingName);
|
||||
|
||||
this.attachToNewPurchaseOrder(purchaseOrderList, purchaseOrderMerged);
|
||||
|
||||
this.computePurchaseOrder(purchaseOrderMerged);
|
||||
|
||||
purchaseOrderMerged.setStatusSelect(statusSelect);
|
||||
|
||||
purchaseOrderRepo.save(purchaseOrderMerged);
|
||||
|
||||
this.attachAttachment(purchaseOrderList, purchaseOrderMerged);
|
||||
|
||||
this.removeOldPurchaseOrders(purchaseOrderList);
|
||||
|
||||
return purchaseOrderMerged;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void attachAttachment(List<PurchaseOrder> ancientPOs, PurchaseOrder newPO) {
|
||||
// start attachement heritage
|
||||
DMSFile dmsP = new DMSFile();
|
||||
dmsP.setFileName(newPO.getPurchaseOrderSeq());
|
||||
dmsP.setRelatedId(newPO.getId());
|
||||
dmsP.setIsDirectory(true);
|
||||
dmsP.setParent(dmsFileRepository.find(Long.parseLong("1")));
|
||||
dmsP.setRelatedModel(newPO.getClass().getCanonicalName());
|
||||
DMSFile dmsFileP = dmsFileRepository.save(dmsP);
|
||||
|
||||
for (PurchaseOrder purchaseOrder : ancientPOs) {
|
||||
List<DMSFile> dmsFiles =
|
||||
dmsFileRepository
|
||||
.all()
|
||||
.filter("self.relatedId = ?1 and self.isDirectory = false", purchaseOrder.getId())
|
||||
.fetch();
|
||||
|
||||
for (DMSFile dmsFile : dmsFiles) {
|
||||
dmsFile.setParent(dmsFileP);
|
||||
dmsFile.setRelatedId(newPO.getId());
|
||||
dmsFileRepository.save(dmsFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Attachment of all purchase order lines to new purchase order
|
||||
public void attachToNewPurchaseOrder(
|
||||
List<PurchaseOrder> purchaseOrderList, PurchaseOrder purchaseOrderMerged) {
|
||||
for (PurchaseOrder purchaseOrder : purchaseOrderList) {
|
||||
int countLine = 1;
|
||||
for (PurchaseOrderLine purchaseOrderLine : purchaseOrder.getPurchaseOrderLineList()) {
|
||||
purchaseOrderLine.setSequence(countLine * 10);
|
||||
purchaseOrderMerged.addPurchaseOrderLineListItem(purchaseOrderLine);
|
||||
countLine++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void attachPurchaseRequestToNewOrder(
|
||||
Set<PurchaseRequest> purchaseRequestSet,
|
||||
PurchaseOrder purchaseOrderMerged,
|
||||
List<PurchaseOrder> purchaseOrderList) {
|
||||
for (PurchaseRequest purchaseRequest : purchaseRequestSet) {
|
||||
|
||||
List<Long> ids =
|
||||
purchaseOrderList.stream().map(PurchaseOrder::getId).collect(Collectors.toList());
|
||||
Set<PurchaseOrder> purchaseOrders = purchaseRequest.getPurchaseOrderSet();
|
||||
purchaseRequest.getPurchaseOrderSet().removeIf(t -> ids.contains(t.getId()));
|
||||
purchaseOrders.add(purchaseOrderMerged);
|
||||
purchaseRequest.setPurchaseOrderSet(purchaseOrders);
|
||||
Beans.get(PurchaseRequestRepository.class).save(purchaseRequest);
|
||||
}
|
||||
purchaseOrderMerged.setPurchaseRequestSet(purchaseRequestSet);
|
||||
}
|
||||
|
||||
// Remove old purchase orders after merge
|
||||
public void removeOldPurchaseOrders(List<PurchaseOrder> purchaseOrderList) {
|
||||
for (PurchaseOrder purchaseOrder : purchaseOrderList) {
|
||||
// purchaseOrderRepo.remove(purchaseOrder);
|
||||
purchaseOrder.setArchived(true);
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDraftSequence(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
|
||||
if (purchaseOrder.getId() != null
|
||||
&& Strings.isNullOrEmpty(purchaseOrder.getPurchaseOrderSeq())) {
|
||||
purchaseOrder.setPurchaseOrderSeq(sequenceService.getDraftSequenceNumber(purchaseOrder));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public void updateCostPrice(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
if (purchaseOrder.getPurchaseOrderLineList() != null) {
|
||||
for (PurchaseOrderLine purchaseOrderLine : purchaseOrder.getPurchaseOrderLineList()) {
|
||||
Product product = purchaseOrderLine.getProduct();
|
||||
if (product != null) {
|
||||
product.setPurchasePrice(
|
||||
purchaseOrder.getInAti()
|
||||
? purchaseOrderLine.getInTaxPrice()
|
||||
: purchaseOrderLine.getPrice());
|
||||
if (product.getDefShipCoefByPartner()) {
|
||||
Unit productPurchaseUnit =
|
||||
product.getPurchasesUnit() != null ? product.getPurchasesUnit() : product.getUnit();
|
||||
BigDecimal convertedQty =
|
||||
Beans.get(UnitConversionService.class)
|
||||
.convert(
|
||||
purchaseOrderLine.getUnit(),
|
||||
productPurchaseUnit,
|
||||
purchaseOrderLine.getQty(),
|
||||
purchaseOrderLine.getQty().scale(),
|
||||
product);
|
||||
BigDecimal shippingCoef =
|
||||
Beans.get(ShippingCoefService.class)
|
||||
.getShippingCoefDefByPartner(
|
||||
product,
|
||||
purchaseOrder.getSupplierPartner(),
|
||||
purchaseOrder.getCompany(),
|
||||
convertedQty);
|
||||
if (shippingCoef.compareTo(BigDecimal.ZERO) != 0) {
|
||||
product.setShippingCoef(shippingCoef);
|
||||
}
|
||||
}
|
||||
if (product.getCostTypeSelect() == ProductRepository.COST_TYPE_LAST_PURCHASE_PRICE) {
|
||||
product.setCostPrice(
|
||||
purchaseOrder.getInAti()
|
||||
? purchaseOrderLine.getInTaxPrice()
|
||||
: purchaseOrderLine.getPrice());
|
||||
if (product.getAutoUpdateSalePrice()) {
|
||||
Beans.get(ProductService.class).updateSalePrice(product);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void draftPurchaseOrder(PurchaseOrder purchaseOrder) {
|
||||
|
||||
purchaseOrder.setStatusSelect(PurchaseOrderRepository.STATUS_DRAFT);
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public void validatePurchaseOrder(PurchaseOrder purchaseOrder)
|
||||
throws AxelorException, MalformedURLException, JSONException {
|
||||
Boolean checkTcoAcceptedEnabled =
|
||||
Beans.get(AppBaseService.class).getAppBase().getEnableCheckTcoAccpeted();
|
||||
// && appPurchaseService.getAppPurchase().getUsersExludedFromTcoList()
|
||||
if (checkTcoAcceptedEnabled
|
||||
&& !appPurchaseService
|
||||
.getAppPurchase()
|
||||
.getUsersExludedFromTco()
|
||||
.contains(AuthUtils.getUser())) {
|
||||
checkAllTco(purchaseOrder);
|
||||
}
|
||||
computePurchaseOrder(purchaseOrder);
|
||||
|
||||
purchaseOrder.setStatusSelect(PurchaseOrderRepository.STATUS_VALIDATED);
|
||||
purchaseOrder.setValidationDate(appPurchaseService.getTodayDate());
|
||||
purchaseOrder.setValidatedByUser(AuthUtils.getUser());
|
||||
|
||||
purchaseOrder.setSupplierPartner(validateSupplier(purchaseOrder));
|
||||
|
||||
updateCostPrice(purchaseOrder);
|
||||
|
||||
if (purchaseOrder.getImportationFolder() != null) {
|
||||
List<PurchaseOrder> purchaseOrders =
|
||||
purchaseOrder.getImportationFolder().getPurchaseOrderList();
|
||||
ImportationFolder importationFolder = purchaseOrder.getImportationFolder();
|
||||
calculateSum(purchaseOrders, importationFolder);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void addFareToImportationFolder(PurchaseOrder purchaseOrder, BigDecimal amount)
|
||||
throws AxelorException, MalformedURLException, JSONException {
|
||||
|
||||
Product product = Beans.get(ProductRepository.class).find(new Long("8931"));
|
||||
Unit unit = Beans.get(UnitRepository.class).find(new Long("4"));
|
||||
TaxLine taxLine = Beans.get(TaxLineRepository.class).find(new Long("27"));
|
||||
|
||||
PurchaseOrderLine purchaseOrderLine =
|
||||
Beans.get(PurchaseOrderLineService.class)
|
||||
.createPurchaseOrderLine(
|
||||
purchaseOrder, product, product.getName(), "", BigDecimal.ONE, unit);
|
||||
purchaseOrderLine.setPrice(amount);
|
||||
purchaseOrderLine.setPriceDiscounted(amount);
|
||||
purchaseOrderLine.setExTaxTotal(amount);
|
||||
purchaseOrderLine.setInTaxTotal(amount);
|
||||
purchaseOrderLine.setCompanyExTaxTotal(amount);
|
||||
purchaseOrderLine.setCompanyInTaxTotal(amount);
|
||||
purchaseOrderLine.setTaxLine(taxLine);
|
||||
purchaseOrder.addPurchaseOrderLineListItem(purchaseOrderLine);
|
||||
|
||||
validatePurchaseOrder(purchaseOrder);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void finishPurchaseOrder(PurchaseOrder purchaseOrder, String cancelReasonStr) {
|
||||
purchaseOrder.setStatusSelect(PurchaseOrderRepository.STATUS_FINISHED);
|
||||
purchaseOrder.setFinishReasonStr(cancelReasonStr);
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void cancelPurchaseOrder(PurchaseOrder purchaseOrder) {
|
||||
purchaseOrder.setStatusSelect(PurchaseOrderRepository.STATUS_CANCELED);
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void calculateSum(List<PurchaseOrder> purchaseOrders, ImportationFolder importationFolder)
|
||||
throws AxelorException {
|
||||
BigDecimal amount = BigDecimal.ZERO;
|
||||
BigDecimal taxAmount = BigDecimal.ZERO;
|
||||
BigDecimal totalAmount = BigDecimal.ZERO;
|
||||
|
||||
for (PurchaseOrder purchaseOrder : purchaseOrders) {
|
||||
if (purchaseOrder.getCurrency().getId() == 148 || purchaseOrder.getCurrency().getId() == 46) {
|
||||
Currency currency =
|
||||
Beans.get(CurrencyRepository.class).find(purchaseOrder.getCurrency().getId());
|
||||
Currency currencyDzd = Beans.get(CurrencyRepository.class).findByCode("DZD");
|
||||
BigDecimal currencyAmount =
|
||||
Beans.get(CurrencyService.class).getCurrencyConversionRate(currency, currencyDzd);
|
||||
|
||||
currencyAmount = currencyAmount.setScale(2, BigDecimal.ROUND_HALF_EVEN);
|
||||
|
||||
BigDecimal finalAmount = purchaseOrder.getExTaxTotal().multiply(currencyAmount);
|
||||
BigDecimal finalTaxAmount = purchaseOrder.getTaxTotal().multiply(currencyAmount);
|
||||
BigDecimal finalTotalAmount = purchaseOrder.getInTaxTotal().multiply(currencyAmount);
|
||||
|
||||
amount = amount.add(finalAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN);
|
||||
taxAmount = taxAmount.add(finalTaxAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN);
|
||||
totalAmount = totalAmount.add(finalTotalAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN);
|
||||
|
||||
} else {
|
||||
amount = amount.add(purchaseOrder.getExTaxTotal());
|
||||
taxAmount = taxAmount.add(purchaseOrder.getTaxTotal());
|
||||
totalAmount = totalAmount.add(purchaseOrder.getInTaxTotal());
|
||||
}
|
||||
}
|
||||
|
||||
importationFolder.setAmount(amount);
|
||||
importationFolder.setTaxAmount(taxAmount);
|
||||
importationFolder.setTotalAmount(totalAmount);
|
||||
|
||||
importationFolderRepo.save(importationFolder);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void setStandByPurchaseOrder(PurchaseOrder purchaseOrder, String standByReasonStr) {
|
||||
|
||||
purchaseOrder.setStatusSelect(PurchaseOrderRepository.STATUS_STANDBY);
|
||||
purchaseOrder.setStandbyRaison(standByReasonStr);
|
||||
purchaseOrder.setStandbyByUser(AuthUtils.getUser());
|
||||
purchaseOrder.setStandbyDate(Beans.get(AppBaseService.class).getTodayDate());
|
||||
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void cancelReasonPurchaseOrder(
|
||||
PurchaseOrder purchaseOrder, CancelReason cancelReason, String cancelReasonStr) {
|
||||
|
||||
purchaseOrder.setStatusSelect(PurchaseOrderRepository.STATUS_CANCELED);
|
||||
purchaseOrder.setCancelReason(cancelReason);
|
||||
if (Strings.isNullOrEmpty(cancelReasonStr)) {
|
||||
purchaseOrder.setCancelReasonStr(cancelReason.getName());
|
||||
} else {
|
||||
purchaseOrder.setCancelReasonStr(cancelReasonStr);
|
||||
}
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
}
|
||||
|
||||
public void checkAllTco(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
/*vérifier si tous les tco sont validées */
|
||||
PurchaseOrderLineService purchaseOrderLineService = Beans.get(PurchaseOrderLineService.class);
|
||||
javax.persistence.Query dateQuery =
|
||||
com.axelor
|
||||
.db
|
||||
.JPA
|
||||
.em()
|
||||
.createNativeQuery(
|
||||
"SELECT a.id FROM purchase_purchase_order_line as a "
|
||||
+ "left join public.suppliermanagement_purchase_order_supplier_line as b on a.id = b.purchase_order_line "
|
||||
+ "where a.purchase_order = "
|
||||
+ purchaseOrder.getId()
|
||||
+ " and ((b.state_select = 3 and b.currency = 41) or (b.state_select = 7 and b.currency != 41)) and ( a.archived is not true or b.archived is not true ) "
|
||||
+ "group by a.id , b.state_select ");
|
||||
List<BigInteger> purchaseOrdeLineAccepted = dateQuery.getResultList();
|
||||
|
||||
javax.persistence.Query dateQueryTow =
|
||||
com.axelor
|
||||
.db
|
||||
.JPA
|
||||
.em()
|
||||
.createNativeQuery(
|
||||
"SELECT a.id FROM purchase_purchase_order_line as a "
|
||||
+ "left join public.suppliermanagement_purchase_order_supplier_line as b on a.id = b.purchase_order_line "
|
||||
+ "where a.purchase_order = "
|
||||
+ purchaseOrder.getId()
|
||||
+ " and ( a.archived is not true or b.archived is not true ) "
|
||||
+ "group by a.id");
|
||||
List<BigInteger> purchaseOrdeLineAll = dateQueryTow.getResultList();
|
||||
|
||||
// subtracting Lists
|
||||
Set<BigInteger> purchaseOrdeLineIdsDiff =
|
||||
purchaseOrdeLineAll
|
||||
.stream()
|
||||
.filter(item -> !purchaseOrdeLineAccepted.contains(item))
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
List<String> Products = new ArrayList<>();
|
||||
for (BigInteger id : purchaseOrdeLineIdsDiff) {
|
||||
PurchaseOrderLine purchaseOrderLine =
|
||||
Beans.get(PurchaseOrderLineRepository.class).find(id.longValue());
|
||||
Products.add(purchaseOrderLine.getProductName());
|
||||
}
|
||||
|
||||
if (purchaseOrdeLineAccepted.size() != purchaseOrdeLineAll.size()) {
|
||||
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_CONFIGURATION_ERROR,
|
||||
I18n.get(IExceptionMessage.TCO),
|
||||
Products);
|
||||
}
|
||||
}
|
||||
|
||||
public void checkTcoToApprove(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
/*vérifier si tous les tco sont validées */
|
||||
javax.persistence.Query dateQuery =
|
||||
com.axelor
|
||||
.db
|
||||
.JPA
|
||||
.em()
|
||||
.createNativeQuery(
|
||||
"SELECT A.product "
|
||||
+ "FROM PURCHASE_PURCHASE_ORDER_LINE AS A "
|
||||
+ "LEFT JOIN PUBLIC.SUPPLIERMANAGEMENT_PURCHASE_ORDER_SUPPLIER_LINE AS B "
|
||||
+ "ON A.ID = B.PURCHASE_ORDER_LINE "
|
||||
+ "WHERE A.PURCHASE_ORDER = "
|
||||
+ purchaseOrder.getId()
|
||||
+ " AND (A.ARCHIVED IS NOT TRUE OR B.ARCHIVED IS NOT TRUE) and B.ID is null "
|
||||
+ "GROUP BY A.ID, B.ID");
|
||||
List<BigInteger> productsResult = dateQuery.getResultList();
|
||||
|
||||
List<String> products = new ArrayList<>();
|
||||
for (BigInteger id : productsResult) {
|
||||
Product product = Beans.get(ProductRepository.class).find(id.longValue());
|
||||
products.add(product.getFullName());
|
||||
}
|
||||
|
||||
if (products.size() > 0) {
|
||||
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_CONFIGURATION_ERROR,
|
||||
I18n.get(IExceptionMessage.NO_TCO),
|
||||
products);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public ImportationFolder generateImportationFolder(PurchaseOrder purchaseOrder)
|
||||
throws AxelorException {
|
||||
ImportationFolder importationFolder = new ImportationFolder();
|
||||
List<PurchaseOrder> purchaseOrders = new ArrayList<PurchaseOrder>();
|
||||
purchaseOrders.add(purchaseOrder);
|
||||
importationFolder.setPurchaseOrderList(purchaseOrders);
|
||||
importationFolder.setCurrency(purchaseOrder.getCurrency());
|
||||
importationFolder.setProgress(10);
|
||||
importationFolder.setSupplierPartner(purchaseOrder.getSupplierPartner());
|
||||
|
||||
BigDecimal amount = BigDecimal.ZERO;
|
||||
BigDecimal taxAmount = BigDecimal.ZERO;
|
||||
BigDecimal totalAmount = BigDecimal.ZERO;
|
||||
|
||||
if (purchaseOrder.getCurrency().getId() != 41) {
|
||||
Currency currency =
|
||||
Beans.get(CurrencyRepository.class).find(purchaseOrder.getCurrency().getId());
|
||||
Currency currencyDzd = Beans.get(CurrencyRepository.class).findByCode("DZD");
|
||||
BigDecimal currencyAmount =
|
||||
Beans.get(CurrencyService.class).getCurrencyConversionRate(currency, currencyDzd);
|
||||
|
||||
currencyAmount = currencyAmount.setScale(2, BigDecimal.ROUND_HALF_EVEN);
|
||||
|
||||
BigDecimal finalAmount = purchaseOrder.getExTaxTotal().multiply(currencyAmount);
|
||||
BigDecimal finalTaxAmount = purchaseOrder.getTaxTotal().multiply(currencyAmount);
|
||||
BigDecimal finalTotalAmount = purchaseOrder.getInTaxTotal().multiply(currencyAmount);
|
||||
|
||||
amount = amount.add(finalAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN);
|
||||
taxAmount = taxAmount.add(finalTaxAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN);
|
||||
totalAmount = totalAmount.add(finalTotalAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN);
|
||||
|
||||
} else {
|
||||
amount = amount.add(purchaseOrder.getExTaxTotal());
|
||||
taxAmount = taxAmount.add(purchaseOrder.getTaxTotal());
|
||||
totalAmount = totalAmount.add(purchaseOrder.getInTaxTotal());
|
||||
}
|
||||
|
||||
importationFolder.setAmount(amount);
|
||||
importationFolder.setTaxAmount(taxAmount);
|
||||
importationFolder.setTotalAmount(totalAmount);
|
||||
|
||||
ImportationFolder imp = importationFolderRepo.save(importationFolder);
|
||||
purchaseOrder.setImportationFolder(imp);
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
|
||||
return importationFolder;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void setPurchaseOrderBarCodeSeq(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
|
||||
if (purchaseOrder.getBarCodeSeq() == null
|
||||
&& purchaseOrder.getStatusSelect() != PurchaseOrderRepository.STATUS_DRAFT) {
|
||||
try {
|
||||
boolean addPadding = false;
|
||||
InputStream inStream = null;
|
||||
|
||||
inStream =
|
||||
barcodeGeneratorService.createBarCode(
|
||||
purchaseOrder.getPurchaseOrderSeq(),
|
||||
appBaseService.getAppBase().getBarcodeTypeConfigPurchaseOrderSeq(),
|
||||
addPadding);
|
||||
|
||||
if (inStream != null) {
|
||||
MetaFile barcodeFile =
|
||||
metaFiles.upload(
|
||||
inStream, String.format("PurchaseOrderSeqBarCode%d.png", purchaseOrder.getId()));
|
||||
purchaseOrder.setBarCodeSeq(barcodeFile);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (AxelorException e) {
|
||||
throw new ValidationException(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void createPurchaseOrderBarCodeSeq(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
this.setPurchaseOrderBarCodeSeq(purchaseOrder);
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.base.service.CurrencyService;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.google.inject.Inject;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class PurchaseOrderToolService {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
@Inject private CurrencyService currencyService;
|
||||
|
||||
/**
|
||||
* Calculer le montant HT d'une ligne de commande.
|
||||
*
|
||||
* @param quantity Quantité.
|
||||
* @param price Le prix.
|
||||
* @return Le montant HT de la ligne.
|
||||
*/
|
||||
public BigDecimal computeAmount(BigDecimal quantity, BigDecimal price) {
|
||||
|
||||
BigDecimal amount =
|
||||
quantity
|
||||
.multiply(price)
|
||||
.setScale(AppBaseService.DEFAULT_NB_DECIMAL_DIGITS, RoundingMode.HALF_EVEN);
|
||||
|
||||
LOG.debug(
|
||||
"Calcul du montant HT avec une quantité de {} pour {} : {}",
|
||||
new Object[] {quantity, price, amount});
|
||||
|
||||
return amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAccountingExTaxTotal(BigDecimal exTaxTotal, PurchaseOrder purchaseOrder)
|
||||
throws AxelorException {
|
||||
|
||||
return currencyService
|
||||
.getAmountCurrencyConvertedAtDate(
|
||||
purchaseOrder.getCurrency(),
|
||||
purchaseOrder.getSupplierPartner().getCurrency(),
|
||||
exTaxTotal,
|
||||
purchaseOrder.getOrderDate())
|
||||
.setScale(AppBaseService.DEFAULT_NB_DECIMAL_DIGITS, RoundingMode.HALF_UP);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.purchase.db.SupplierCatalog;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
|
||||
public interface PurchaseProductService {
|
||||
|
||||
public Map<String, Object> getDiscountsFromCatalog(
|
||||
SupplierCatalog supplierCatalog, BigDecimal price);
|
||||
|
||||
/**
|
||||
* Search for the last shipping coef in purchase order line.
|
||||
*
|
||||
* @param product a product
|
||||
* @return An optional with the shippingCoef
|
||||
*/
|
||||
BigDecimal getLastShippingCoef(Product product) throws AxelorException;
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.base.db.Company;
|
||||
import com.axelor.apps.base.db.Partner;
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.base.db.Unit;
|
||||
import com.axelor.apps.base.db.repo.PriceListLineRepository;
|
||||
import com.axelor.apps.base.service.ShippingCoefService;
|
||||
import com.axelor.apps.base.service.UnitConversionService;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLine;
|
||||
import com.axelor.apps.purchase.db.SupplierCatalog;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderLineRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderRepository;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.inject.Beans;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class PurchaseProductServiceImpl implements PurchaseProductService {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getDiscountsFromCatalog(
|
||||
SupplierCatalog supplierCatalog, BigDecimal price) {
|
||||
Map<String, Object> discounts = new HashMap<>();
|
||||
|
||||
if (supplierCatalog.getPrice().compareTo(price) != 0) {
|
||||
discounts.put("discountAmount", price.subtract(supplierCatalog.getPrice()));
|
||||
discounts.put("discountTypeSelect", 2);
|
||||
} else {
|
||||
discounts.put("discountTypeSelect", PriceListLineRepository.AMOUNT_TYPE_NONE);
|
||||
discounts.put("discountAmount", BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
return discounts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getLastShippingCoef(Product product) throws AxelorException {
|
||||
PurchaseOrderLine lastPurchaseOrderLine =
|
||||
Beans.get(PurchaseOrderLineRepository.class)
|
||||
.all()
|
||||
.filter(
|
||||
"self.product.id = :productId "
|
||||
+ "AND (self.purchaseOrder.statusSelect = :validated "
|
||||
+ "OR self.purchaseOrder.statusSelect = :finished)")
|
||||
.bind("productId", product.getId())
|
||||
.bind("validated", PurchaseOrderRepository.STATUS_VALIDATED)
|
||||
.bind("finished", PurchaseOrderRepository.STATUS_FINISHED)
|
||||
.order("-purchaseOrder.validationDate")
|
||||
.fetchOne();
|
||||
if (lastPurchaseOrderLine != null) {
|
||||
Partner partner = lastPurchaseOrderLine.getPurchaseOrder().getSupplierPartner();
|
||||
Company company = lastPurchaseOrderLine.getPurchaseOrder().getCompany();
|
||||
Unit productUnit =
|
||||
Beans.get(PurchaseOrderLineService.class).getPurchaseUnit(lastPurchaseOrderLine);
|
||||
BigDecimal qty =
|
||||
Beans.get(UnitConversionService.class)
|
||||
.convert(
|
||||
lastPurchaseOrderLine.getUnit(),
|
||||
productUnit,
|
||||
lastPurchaseOrderLine.getQty(),
|
||||
lastPurchaseOrderLine.getQty().scale(),
|
||||
product);
|
||||
return Beans.get(ShippingCoefService.class).getShippingCoef(product, partner, company, qty);
|
||||
} else {
|
||||
return BigDecimal.ONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.PurchaseRequest;
|
||||
import com.axelor.auth.db.User;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
public interface PurchaseRequestService {
|
||||
|
||||
public void confirmCart();
|
||||
|
||||
public void acceptRequest(List<PurchaseRequest> purchaseRequests);
|
||||
|
||||
public void purchaseRequestsAssignedToUser(
|
||||
List<Long> requestIds, HashSet<User> user, Boolean canDuplicatePO, int limitPo);
|
||||
|
||||
public List<PurchaseOrder> generatePo(
|
||||
List<PurchaseRequest> purchaseRequests, Boolean groupBySupplier, Boolean groupByProduct)
|
||||
throws AxelorException;
|
||||
}
|
||||
@ -0,0 +1,235 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLine;
|
||||
import com.axelor.apps.purchase.db.PurchaseRequest;
|
||||
import com.axelor.apps.purchase.db.PurchaseRequestLine;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderLineRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseRequestRepository;
|
||||
import com.axelor.auth.AuthUtils;
|
||||
import com.axelor.auth.db.User;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.persist.Transactional;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class PurchaseRequestServiceImpl implements PurchaseRequestService {
|
||||
|
||||
@Inject private PurchaseRequestRepository purchaseRequestRepo;
|
||||
@Inject private PurchaseOrderService purchaseOrderService;
|
||||
@Inject private PurchaseOrderLineService purchaseOrderLineService;
|
||||
@Inject private PurchaseOrderRepository purchaseOrderRepo;
|
||||
@Inject private PurchaseOrderLineRepository purchaseOrderLineRepo;
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public void confirmCart() {
|
||||
|
||||
List<PurchaseRequest> purchaseRequests =
|
||||
purchaseRequestRepo
|
||||
.all()
|
||||
.filter("self.statusSelect = 1 and self.createdBy = ?1", AuthUtils.getUser())
|
||||
.fetch();
|
||||
|
||||
for (PurchaseRequest purchaseRequest : purchaseRequests) {
|
||||
purchaseRequest.setStatusSelect(2);
|
||||
purchaseRequestRepo.save(purchaseRequest);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public void acceptRequest(List<PurchaseRequest> purchaseRequests) {
|
||||
|
||||
for (PurchaseRequest purchaseRequest : purchaseRequests) {
|
||||
purchaseRequest.setStatusSelect(3);
|
||||
purchaseRequestRepo.save(purchaseRequest);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
@Override
|
||||
public List<PurchaseOrder> generatePo(
|
||||
List<PurchaseRequest> purchaseRequests, Boolean groupBySupplier, Boolean groupByProduct)
|
||||
throws AxelorException {
|
||||
|
||||
List<PurchaseOrderLine> purchaseOrderLineList = new ArrayList<PurchaseOrderLine>();
|
||||
Map<String, PurchaseOrder> purchaseOrderMap = new HashMap<>();
|
||||
|
||||
for (PurchaseRequest purchaseRequest : purchaseRequests) {
|
||||
PurchaseOrder purchaseOrder;
|
||||
|
||||
String key = groupBySupplier ? getPurchaseOrderGroupBySupplierKey(purchaseRequest) : null;
|
||||
if (key != null && purchaseOrderMap.containsKey(key)) {
|
||||
purchaseOrder = purchaseOrderMap.get(key);
|
||||
} else {
|
||||
purchaseOrder = createPurchaseOrder(purchaseRequest);
|
||||
// SOPHAL
|
||||
setProjectPurchaseOrder(purchaseOrder, purchaseRequest);
|
||||
purchaseOrder.setNotes(purchaseRequest.getDescription());
|
||||
// sophal set purchase request
|
||||
// purchaseOrder.setPurchaseRequest(purchaseRequest.getId());
|
||||
// sophal
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
// SOPHAL
|
||||
key = key == null ? purchaseRequest.getId().toString() : key;
|
||||
purchaseOrderMap.put(key, purchaseOrder);
|
||||
}
|
||||
|
||||
if (purchaseOrder == null) {
|
||||
purchaseOrder = createPurchaseOrder(purchaseRequest);
|
||||
// SOPHAL
|
||||
setProjectPurchaseOrder(purchaseOrder, purchaseRequest);
|
||||
purchaseOrder.setNotes(purchaseRequest.getDescription());
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
// SOPHAL
|
||||
}
|
||||
|
||||
for (PurchaseRequestLine purchaseRequestLine : purchaseRequest.getPurchaseRequestLineList()) {
|
||||
PurchaseOrderLine purchaseOrderLine = new PurchaseOrderLine();
|
||||
Product product = purchaseRequestLine.getProduct();
|
||||
|
||||
purchaseOrderLine =
|
||||
groupByProduct && purchaseOrder != null
|
||||
? getPoLineByProduct(product, purchaseOrder)
|
||||
: null;
|
||||
|
||||
purchaseOrderLine =
|
||||
purchaseOrderLineService.createPurchaseOrderLine(
|
||||
purchaseOrder,
|
||||
product,
|
||||
purchaseRequestLine.getNewProduct()
|
||||
? purchaseRequestLine.getProductTitle()
|
||||
: product.getName(),
|
||||
purchaseRequestLine.getNewProduct() ? null : product.getDescription(),
|
||||
purchaseRequestLine.getQuantity(),
|
||||
purchaseRequestLine.getUnit(),
|
||||
purchaseRequestLine);
|
||||
purchaseOrder.addPurchaseOrderLineListItem(purchaseOrderLine);
|
||||
purchaseOrderLineList.add(purchaseOrderLine);
|
||||
purchaseOrderLineService.compute(purchaseOrderLine, purchaseOrder);
|
||||
}
|
||||
purchaseOrder.getPurchaseOrderLineList().addAll(purchaseOrderLineList);
|
||||
purchaseOrderService.computePurchaseOrder(purchaseOrder);
|
||||
purchaseOrder.setPurchaseRequestOrigin(purchaseRequest);
|
||||
purchaseOrder.setPurchaseType(purchaseRequest.getPurchaseType());
|
||||
purchaseOrderRepo.save(purchaseOrder);
|
||||
Set<PurchaseOrder> hash_Set = new HashSet<PurchaseOrder>();
|
||||
hash_Set.add(purchaseOrder);
|
||||
purchaseRequest.addPurchaseOrderSetItem(purchaseOrder);
|
||||
purchaseRequest.setAssignedToUser(AuthUtils.getUser());
|
||||
purchaseRequest.addBuyer(AuthUtils.getUser());
|
||||
purchaseRequestRepo.save(purchaseRequest);
|
||||
}
|
||||
List<PurchaseOrder> purchaseOrders =
|
||||
purchaseOrderMap.values().stream().collect(Collectors.toList());
|
||||
return purchaseOrders;
|
||||
}
|
||||
|
||||
private PurchaseOrderLine getPoLineByProduct(Product product, PurchaseOrder purchaseOrder) {
|
||||
|
||||
PurchaseOrderLine purchaseOrderLine =
|
||||
purchaseOrder.getPurchaseOrderLineList() != null
|
||||
&& !purchaseOrder.getPurchaseOrderLineList().isEmpty()
|
||||
? purchaseOrder
|
||||
.getPurchaseOrderLineList()
|
||||
.stream()
|
||||
.filter(poLine -> poLine.getProduct().equals(product))
|
||||
.findFirst()
|
||||
.orElse(null)
|
||||
: null;
|
||||
return purchaseOrderLine;
|
||||
}
|
||||
|
||||
protected PurchaseOrder createPurchaseOrder(PurchaseRequest purchaseRequest)
|
||||
throws AxelorException {
|
||||
return purchaseOrderRepo.save(
|
||||
purchaseOrderService.createPurchaseOrder(
|
||||
AuthUtils.getUser(),
|
||||
purchaseRequest.getCompany(),
|
||||
null,
|
||||
purchaseRequest.getSupplierUser().getCurrency(),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
"", // notes
|
||||
LocalDate.now(),
|
||||
null,
|
||||
purchaseRequest.getSupplierUser(),
|
||||
null));
|
||||
}
|
||||
|
||||
protected String getPurchaseOrderGroupBySupplierKey(PurchaseRequest purchaseRequest) {
|
||||
return purchaseRequest.getSupplierUser().getId().toString();
|
||||
}
|
||||
|
||||
@Transactional
|
||||
protected void setProjectPurchaseOrder(
|
||||
PurchaseOrder purchaseOrder, PurchaseRequest purchaseRequest) {
|
||||
javax.persistence.Query query =
|
||||
com.axelor
|
||||
.db
|
||||
.JPA
|
||||
.em()
|
||||
.createNativeQuery("SELECT project from purchase_purchase_request where id = ?1")
|
||||
.setParameter(1, purchaseRequest.getId());
|
||||
|
||||
BigInteger id_project = (BigInteger) query.getSingleResult();
|
||||
|
||||
if (id_project != null) {
|
||||
javax.persistence.Query update =
|
||||
com.axelor
|
||||
.db
|
||||
.JPA
|
||||
.em()
|
||||
.createNativeQuery(
|
||||
"UPDATE purchase_purchase_order SET " + " project = :project WHERE id = :id");
|
||||
update.setParameter("project", id_project);
|
||||
update.setParameter("id", purchaseOrder.getId());
|
||||
update.executeUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void purchaseRequestsAssignedToUser(
|
||||
List<Long> requestIds, HashSet<User> users, Boolean canDuplicatePO, int limitPo) {
|
||||
|
||||
for (int i = 0; i < requestIds.size(); i++) {
|
||||
long requestId = ((Number) requestIds.get(i)).longValue();
|
||||
PurchaseRequest purchaseRequest = purchaseRequestRepo.find(requestId);
|
||||
// purchaseRequest.setAssignedToUser(user);
|
||||
purchaseRequest.setBuyers(users.stream().collect(Collectors.toSet()));
|
||||
purchaseRequest.setLimitPo(limitPo);
|
||||
purchaseRequest.setCanDuplicatePo(canDuplicatePO);
|
||||
purchaseRequestRepo.save(purchaseRequest);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.base.db.Currency;
|
||||
import com.axelor.apps.base.db.Partner;
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.purchase.db.SupplierCatalog;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Map;
|
||||
|
||||
public interface SupplierCatalogService {
|
||||
|
||||
public Map<String, Object> updateInfoFromCatalog(
|
||||
Product product, BigDecimal qty, Partner partner, Currency currency, LocalDate date)
|
||||
throws AxelorException;
|
||||
|
||||
public SupplierCatalog getSupplierCatalog(Product product, Partner supplierPartner);
|
||||
}
|
||||
@ -0,0 +1,119 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import com.axelor.apps.base.db.Currency;
|
||||
import com.axelor.apps.base.db.Partner;
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.base.service.CurrencyService;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.purchase.db.SupplierCatalog;
|
||||
import com.axelor.apps.purchase.db.repo.SupplierCatalogRepository;
|
||||
import com.axelor.apps.purchase.service.app.AppPurchaseService;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.google.inject.Inject;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class SupplierCatalogServiceImpl implements SupplierCatalogService {
|
||||
|
||||
@Inject protected AppBaseService appBaseService;
|
||||
|
||||
@Inject protected AppPurchaseService appPurchaseService;
|
||||
|
||||
@Inject protected CurrencyService currencyService;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> updateInfoFromCatalog(
|
||||
Product product, BigDecimal qty, Partner partner, Currency currency, LocalDate date)
|
||||
throws AxelorException {
|
||||
|
||||
Map<String, Object> info = null;
|
||||
List<SupplierCatalog> supplierCatalogList = null;
|
||||
|
||||
if (appPurchaseService.getAppPurchase().getManageSupplierCatalog()) {
|
||||
supplierCatalogList = product.getSupplierCatalogList();
|
||||
}
|
||||
if (supplierCatalogList != null && !supplierCatalogList.isEmpty()) {
|
||||
SupplierCatalog supplierCatalog =
|
||||
Beans.get(SupplierCatalogRepository.class)
|
||||
.all()
|
||||
.filter(
|
||||
"self.product = ?1 AND self.minQty <= ?2 AND self.supplierPartner = ?3 ORDER BY self.minQty DESC",
|
||||
product,
|
||||
qty,
|
||||
partner)
|
||||
.fetchOne();
|
||||
|
||||
if (supplierCatalog != null) {
|
||||
info = new HashMap<>();
|
||||
info.put(
|
||||
"price",
|
||||
currencyService
|
||||
.getAmountCurrencyConvertedAtDate(
|
||||
supplierCatalog.getSupplierPartner().getCurrency(),
|
||||
currency,
|
||||
supplierCatalog.getPrice(),
|
||||
date)
|
||||
.setScale(appBaseService.getNbDecimalDigitForUnitPrice(), RoundingMode.HALF_UP));
|
||||
info.put("productName", supplierCatalog.getProductSupplierName());
|
||||
info.put("productCode", supplierCatalog.getProductSupplierCode());
|
||||
} else if (this.getSupplierCatalog(product, partner) != null) {
|
||||
info = new HashMap<>();
|
||||
info.put(
|
||||
"price",
|
||||
currencyService
|
||||
.getAmountCurrencyConvertedAtDate(
|
||||
product.getPurchaseCurrency(), currency, product.getPurchasePrice(), date)
|
||||
.setScale(appBaseService.getNbDecimalDigitForUnitPrice(), RoundingMode.HALF_UP));
|
||||
info.put("productName", null);
|
||||
info.put("productCode", null);
|
||||
}
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SupplierCatalog getSupplierCatalog(Product product, Partner supplierPartner) {
|
||||
|
||||
if (appPurchaseService.getAppPurchase().getManageSupplierCatalog()
|
||||
&& product != null
|
||||
&& product.getSupplierCatalogList() != null) {
|
||||
SupplierCatalog resSupplierCatalog = null;
|
||||
|
||||
for (SupplierCatalog supplierCatalog : product.getSupplierCatalogList()) {
|
||||
if (supplierCatalog.getSupplierPartner().equals(supplierPartner)) {
|
||||
resSupplierCatalog =
|
||||
(resSupplierCatalog == null
|
||||
|| resSupplierCatalog.getMinQty().compareTo(supplierCatalog.getMinQty()) > 0)
|
||||
? supplierCatalog
|
||||
: resSupplierCatalog;
|
||||
}
|
||||
}
|
||||
|
||||
return resSupplierCatalog;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service.app;
|
||||
|
||||
import com.axelor.apps.base.db.AppPurchase;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
|
||||
public interface AppPurchaseService extends AppBaseService {
|
||||
|
||||
public AppPurchase getAppPurchase();
|
||||
|
||||
public void generatePurchaseConfigurations();
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service.app;
|
||||
|
||||
import com.axelor.apps.base.db.AppPurchase;
|
||||
import com.axelor.apps.base.db.Company;
|
||||
import com.axelor.apps.base.db.repo.AppPurchaseRepository;
|
||||
import com.axelor.apps.base.db.repo.CompanyRepository;
|
||||
import com.axelor.apps.base.service.app.AppBaseServiceImpl;
|
||||
import com.axelor.apps.purchase.db.PurchaseConfig;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseConfigRepository;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
import com.google.inject.persist.Transactional;
|
||||
import java.util.List;
|
||||
|
||||
@Singleton
|
||||
public class AppPurchaseServiceImpl extends AppBaseServiceImpl implements AppPurchaseService {
|
||||
|
||||
@Inject private AppPurchaseRepository appPurchaseRepo;
|
||||
|
||||
@Inject private CompanyRepository companyRepo;
|
||||
|
||||
@Inject private PurchaseConfigRepository purchaseConfigRepo;
|
||||
|
||||
@Override
|
||||
public AppPurchase getAppPurchase() {
|
||||
return appPurchaseRepo.all().fetchOne();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void generatePurchaseConfigurations() {
|
||||
|
||||
List<Company> companies = companyRepo.all().filter("self.purchaseConfig is null").fetch();
|
||||
|
||||
for (Company company : companies) {
|
||||
PurchaseConfig purchaseConfig = new PurchaseConfig();
|
||||
purchaseConfig.setCompany(company);
|
||||
purchaseConfigRepo.save(purchaseConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service.config;
|
||||
|
||||
import com.axelor.apps.base.db.Company;
|
||||
import com.axelor.apps.purchase.db.PurchaseConfig;
|
||||
import com.axelor.apps.purchase.exception.IExceptionMessage;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.exception.db.repo.TraceBackRepository;
|
||||
import com.axelor.i18n.I18n;
|
||||
|
||||
public class PurchaseConfigService {
|
||||
|
||||
public PurchaseConfig getPurchaseConfig(Company company) throws AxelorException {
|
||||
|
||||
PurchaseConfig purchaseConfig = company.getPurchaseConfig();
|
||||
|
||||
if (purchaseConfig == null) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_CONFIGURATION_ERROR,
|
||||
I18n.get(IExceptionMessage.PURCHASE_CONFIG_1),
|
||||
company.getName());
|
||||
}
|
||||
|
||||
return purchaseConfig;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
package com.axelor.apps.purchase.service.print;
|
||||
|
||||
import com.axelor.apps.ReportFactory;
|
||||
import com.axelor.apps.base.exceptions.IExceptionMessage;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.purchase.db.ImportationFolder;
|
||||
import com.axelor.apps.purchase.report.IReport;
|
||||
import com.axelor.apps.report.engine.ReportSettings;
|
||||
import com.axelor.apps.tool.ModelTool;
|
||||
import com.axelor.apps.tool.ThrowConsumer;
|
||||
import com.axelor.apps.tool.file.PdfTool;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.exception.db.repo.TraceBackRepository;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ImportationFolderPrintService {
|
||||
|
||||
public String printCostPriceSheet(ImportationFolder importationFolder, String formatPdf)
|
||||
throws AxelorException {
|
||||
|
||||
String fileName = getImportationFolderName(false, formatPdf);
|
||||
|
||||
return PdfTool.getFileLinkFromPdfFile(print(importationFolder, formatPdf), fileName);
|
||||
}
|
||||
|
||||
public String printImportationfolders(List<Long> ids) throws IOException {
|
||||
List<File> importationFolders = new ArrayList<>();
|
||||
ModelTool.apply(
|
||||
ImportationFolder.class,
|
||||
ids,
|
||||
new ThrowConsumer<ImportationFolder>() {
|
||||
|
||||
public void accept(ImportationFolder importationFolder) throws Exception {
|
||||
importationFolders.add(print(importationFolder, ReportSettings.FORMAT_PDF));
|
||||
}
|
||||
});
|
||||
String fileName = getImportationFolderName(true, ReportSettings.FORMAT_PDF);
|
||||
return PdfTool.mergePdfToFileLink(importationFolders, fileName);
|
||||
}
|
||||
|
||||
public File print(ImportationFolder importationFolder, String formatPdf) throws AxelorException {
|
||||
ReportSettings reportSettings = prepareReportSettings(importationFolder, formatPdf);
|
||||
return reportSettings.generate().getFile();
|
||||
}
|
||||
|
||||
public ReportSettings prepareReportSettings(ImportationFolder importationFolder, String formatPdf)
|
||||
throws AxelorException {
|
||||
if (importationFolder.getPrintingSettings() == null) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_MISSING_FIELD,
|
||||
String.format(I18n.get(IExceptionMessage.UNIT_CONVERSION_2), importationFolder.getName()),
|
||||
importationFolder);
|
||||
}
|
||||
String locale = ReportSettings.getPrintingLocale(null);
|
||||
String title = getFileName(importationFolder);
|
||||
ReportSettings reportSetting =
|
||||
ReportFactory.createReport(IReport.COST_PRICE_SHEET, title + " - ${date}");
|
||||
|
||||
return reportSetting
|
||||
.addParam("importationFolderId", importationFolder.getId())
|
||||
.addParam("Locale", locale)
|
||||
.addParam("HeaderHeight", importationFolder.getPrintingSettings().getPdfHeaderHeight())
|
||||
.addParam("FooterHeight", importationFolder.getPrintingSettings().getPdfFooterHeight())
|
||||
.addFormat(formatPdf);
|
||||
}
|
||||
|
||||
protected String getImportationFolderName(boolean plural, String formatPdf) {
|
||||
return I18n.get(plural ? "Importation folders" : "Importation folder")
|
||||
+ " - "
|
||||
+ Beans.get(AppBaseService.class).getTodayDate().format(DateTimeFormatter.BASIC_ISO_DATE)
|
||||
+ "."
|
||||
+ formatPdf;
|
||||
}
|
||||
|
||||
public String getFileName(ImportationFolder importationFolder) {
|
||||
return I18n.get("Importation folder") + " " + importationFolder.getName();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service.print;
|
||||
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public interface PurchaseOrderPrintService {
|
||||
|
||||
/**
|
||||
* Print a purchase order
|
||||
*
|
||||
* @return ReportSettings
|
||||
* @throws IOException
|
||||
* @throws AxelorException
|
||||
*/
|
||||
String printPurchaseOrders(List<Long> ids) throws IOException;
|
||||
|
||||
String printPurchaseOrder(PurchaseOrder purchaseOrder, String formatPdf) throws AxelorException;
|
||||
|
||||
String getFileName(PurchaseOrder purchaseOrder);
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service.print;
|
||||
|
||||
import com.axelor.apps.ReportFactory;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.exception.IExceptionMessage;
|
||||
import com.axelor.apps.purchase.report.IReport;
|
||||
import com.axelor.apps.report.engine.ReportSettings;
|
||||
import com.axelor.apps.tool.ModelTool;
|
||||
import com.axelor.apps.tool.ThrowConsumer;
|
||||
import com.axelor.apps.tool.file.PdfTool;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.exception.db.repo.TraceBackRepository;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PurchaseOrderPrintServiceImpl implements PurchaseOrderPrintService {
|
||||
|
||||
@Override
|
||||
public String printPurchaseOrder(PurchaseOrder purchaseOrder, String formatPdf)
|
||||
throws AxelorException {
|
||||
String fileName = getPurchaseOrderFilesName(false, formatPdf);
|
||||
return PdfTool.getFileLinkFromPdfFile(print(purchaseOrder, formatPdf), fileName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String printPurchaseOrders(List<Long> ids) throws IOException {
|
||||
List<File> printedPurchaseOrders = new ArrayList<>();
|
||||
ModelTool.apply(
|
||||
PurchaseOrder.class,
|
||||
ids,
|
||||
new ThrowConsumer<PurchaseOrder>() {
|
||||
|
||||
@Override
|
||||
public void accept(PurchaseOrder purchaseOrder) throws Exception {
|
||||
printedPurchaseOrders.add(print(purchaseOrder, ReportSettings.FORMAT_PDF));
|
||||
}
|
||||
});
|
||||
String fileName = getPurchaseOrderFilesName(true, ReportSettings.FORMAT_PDF);
|
||||
return PdfTool.mergePdfToFileLink(printedPurchaseOrders, fileName);
|
||||
}
|
||||
|
||||
public File print(PurchaseOrder purchaseOrder, String formatPdf) throws AxelorException {
|
||||
ReportSettings reportSettings = prepareReportSettings(purchaseOrder, formatPdf);
|
||||
return reportSettings.generate().getFile();
|
||||
}
|
||||
|
||||
public ReportSettings prepareReportSettings(PurchaseOrder purchaseOrder, String formatPdf)
|
||||
throws AxelorException {
|
||||
if (purchaseOrder.getPrintingSettings() == null) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_MISSING_FIELD,
|
||||
String.format(
|
||||
I18n.get(IExceptionMessage.PURCHASE_ORDER_MISSING_PRINTING_SETTINGS),
|
||||
purchaseOrder.getPurchaseOrderSeq()),
|
||||
purchaseOrder);
|
||||
}
|
||||
String locale = ReportSettings.getPrintingLocale(purchaseOrder.getSupplierPartner());
|
||||
String title = getFileName(purchaseOrder);
|
||||
ReportSettings reportSetting =
|
||||
ReportFactory.createReport(IReport.PURCHASE_ORDER, title + " - ${date}");
|
||||
return reportSetting
|
||||
.addParam("PurchaseOrderId", purchaseOrder.getId())
|
||||
.addParam("Locale", locale)
|
||||
.addParam("HeaderHeight", purchaseOrder.getPrintingSettings().getPdfHeaderHeight())
|
||||
.addParam("FooterHeight", purchaseOrder.getPrintingSettings().getPdfFooterHeight())
|
||||
.addFormat(formatPdf);
|
||||
}
|
||||
|
||||
protected String getPurchaseOrderFilesName(boolean plural, String formatPdf) {
|
||||
return I18n.get(plural ? "Purchase orders" : "Purchase order")
|
||||
+ " - "
|
||||
+ Beans.get(AppBaseService.class).getTodayDate().format(DateTimeFormatter.BASIC_ISO_DATE)
|
||||
+ "."
|
||||
+ formatPdf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileName(PurchaseOrder purchaseOrder) {
|
||||
return I18n.get("Purchase order")
|
||||
+ " "
|
||||
+ purchaseOrder.getPurchaseOrderSeq()
|
||||
+ ((purchaseOrder.getVersionNumber() > 1) ? "-V" + purchaseOrder.getVersionNumber() : "");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service.print;
|
||||
|
||||
import com.axelor.apps.purchase.db.PurchaseRequest;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public interface PurchaseRequestPrintService {
|
||||
|
||||
/**
|
||||
* Print a purchase order
|
||||
*
|
||||
* @return ReportSettings
|
||||
* @throws IOException
|
||||
* @throws AxelorException
|
||||
*/
|
||||
String printPurchaseRequests(List<Long> ids) throws IOException;
|
||||
|
||||
String printPurchaseRequest(PurchaseRequest purchaseRequest, String formatPdf)
|
||||
throws AxelorException;
|
||||
|
||||
String getFileName(PurchaseRequest purchaseRequest);
|
||||
}
|
||||
@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.service.print;
|
||||
|
||||
import com.axelor.apps.ReportFactory;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.purchase.db.PurchaseRequest;
|
||||
import com.axelor.apps.purchase.exception.IExceptionMessage;
|
||||
import com.axelor.apps.purchase.report.IReport;
|
||||
import com.axelor.apps.report.engine.ReportSettings;
|
||||
import com.axelor.apps.tool.ModelTool;
|
||||
import com.axelor.apps.tool.ThrowConsumer;
|
||||
import com.axelor.apps.tool.file.PdfTool;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.exception.db.repo.TraceBackRepository;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PurchaseRequestPrintServiceImpl implements PurchaseRequestPrintService {
|
||||
|
||||
@Override
|
||||
public String printPurchaseRequest(PurchaseRequest purchaseRequest, String formatPdf)
|
||||
throws AxelorException {
|
||||
|
||||
String fileName = getPurchaseRequestFilesName(false, formatPdf);
|
||||
|
||||
return PdfTool.getFileLinkFromPdfFile(print(purchaseRequest, formatPdf), fileName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String printPurchaseRequests(List<Long> ids) throws IOException {
|
||||
List<File> printedPurchaseRequests = new ArrayList<>();
|
||||
ModelTool.apply(
|
||||
PurchaseRequest.class,
|
||||
ids,
|
||||
new ThrowConsumer<PurchaseRequest>() {
|
||||
|
||||
@Override
|
||||
public void accept(PurchaseRequest purchaseRequest) throws Exception {
|
||||
printedPurchaseRequests.add(print(purchaseRequest, ReportSettings.FORMAT_PDF));
|
||||
}
|
||||
});
|
||||
String fileName = getPurchaseRequestFilesName(true, ReportSettings.FORMAT_PDF);
|
||||
return PdfTool.mergePdfToFileLink(printedPurchaseRequests, fileName);
|
||||
}
|
||||
|
||||
public File print(PurchaseRequest purchaseRequest, String formatPdf) throws AxelorException {
|
||||
ReportSettings reportSettings = prepareReportSettings(purchaseRequest, formatPdf);
|
||||
return reportSettings.generate().getFile();
|
||||
}
|
||||
|
||||
public ReportSettings prepareReportSettings(PurchaseRequest purchaseRequest, String formatPdf)
|
||||
throws AxelorException {
|
||||
if (purchaseRequest.getPrintingSettings() == null) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_MISSING_FIELD,
|
||||
String.format(
|
||||
I18n.get(IExceptionMessage.PURCHASE_REQUEST_MISSING_PRINTING_SETTINGS),
|
||||
purchaseRequest.getPurchaseRequestSeq()),
|
||||
purchaseRequest);
|
||||
}
|
||||
String locale = ReportSettings.getPrintingLocale(null);
|
||||
String title = getFileName(purchaseRequest);
|
||||
ReportSettings reportSetting =
|
||||
ReportFactory.createReport(IReport.PURCHASE_REQUEST, title + " - ${date}");
|
||||
|
||||
|
||||
return reportSetting
|
||||
.addParam("PurchaseRequestId", purchaseRequest.getId())
|
||||
.addParam("Locale", locale)
|
||||
.addParam("HeaderHeight", purchaseRequest.getPrintingSettings().getPdfHeaderHeight())
|
||||
.addParam("FooterHeight", purchaseRequest.getPrintingSettings().getPdfFooterHeight())
|
||||
.addFormat(formatPdf);
|
||||
}
|
||||
|
||||
protected String getPurchaseRequestFilesName(boolean plural, String formatPdf) {
|
||||
return I18n.get(plural ? "Purchase requests" : "Purchase request")
|
||||
+ " - "
|
||||
+ Beans.get(AppBaseService.class).getTodayDate().format(DateTimeFormatter.BASIC_ISO_DATE)
|
||||
+ "."
|
||||
+ formatPdf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileName(PurchaseRequest purchaseRequest) {
|
||||
return I18n.get("Purchase request")
|
||||
+ " "
|
||||
+ purchaseRequest.getPurchaseRequestSeq();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.translation;
|
||||
|
||||
public interface ITranslation {
|
||||
|
||||
public static final String PURCHASE_APP_NAME = /*$$(*/ "value:Purchase"; /*)*/
|
||||
public static final String PURCHASE_REQUEST_APP_NAME = /*$$(*/ "value:Purchase Request"; /*)*/
|
||||
|
||||
public static final String ABC_ANALYSIS_START_DATE = /*$$(*/ "AbcAnalysis.startDate"; /*)*/
|
||||
public static final String ABC_ANALYSIS_END_DATE = /*$$(*/ "AbcAnalysis.endDate"; /*)*/
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.web;
|
||||
|
||||
import com.axelor.apps.purchase.service.app.AppPurchaseService;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
@Singleton
|
||||
public class AppPurchaseController {
|
||||
|
||||
public void generatePurchaseConfigurations(ActionRequest request, ActionResponse response) {
|
||||
|
||||
Beans.get(AppPurchaseService.class).generatePurchaseConfigurations();
|
||||
|
||||
response.setReload(true);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,125 @@
|
||||
package com.axelor.apps.purchase.web;
|
||||
|
||||
import com.axelor.apps.message.service.MailAccountService;
|
||||
import java.util.Date;
|
||||
import java.util.Properties;
|
||||
import javax.mail.Authenticator;
|
||||
import javax.mail.Message;
|
||||
import javax.mail.PasswordAuthentication;
|
||||
import javax.mail.Session;
|
||||
import javax.mail.Transport;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
|
||||
public class EmailUtil {
|
||||
|
||||
/**
|
||||
* Utility method to send simple HTML email
|
||||
*
|
||||
* @param session
|
||||
* @param toEmail
|
||||
* @param subject
|
||||
* @param body
|
||||
*/
|
||||
public static void sendEmail(
|
||||
MailAccountService mailAccountService, String toEmail, String subject, String body) {
|
||||
System.out.println("TLSEmail Start");
|
||||
Properties props = new Properties();
|
||||
|
||||
final String fromEmail = mailAccountService.getDefaultSender().getLogin().toString();
|
||||
final String password = mailAccountService.getDefaultSender().getPassword().toString();
|
||||
props.put("mail.smtp.host", mailAccountService.getDefaultSender().getHost());
|
||||
props.put("mail.smtp.port", mailAccountService.getDefaultSender().getPort());
|
||||
props.put("mail.smtp.auth", "true");
|
||||
props.put("mail.smtp.starttls.enable", "true");
|
||||
|
||||
Authenticator auth =
|
||||
new Authenticator() {
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(fromEmail, password);
|
||||
}
|
||||
};
|
||||
Session session = Session.getInstance(props, auth);
|
||||
try {
|
||||
MimeMessage msg = new MimeMessage(session);
|
||||
// set message headers
|
||||
msg.addHeader("Content-type", "text/HTML; charset=UTF-8");
|
||||
msg.addHeader("format", "flowed");
|
||||
msg.addHeader("Content-Transfer-Encoding", "8bit");
|
||||
|
||||
msg.setFrom(new InternetAddress(fromEmail, "ERP SOPHAL"));
|
||||
|
||||
msg.setReplyTo(InternetAddress.parse(fromEmail, false));
|
||||
|
||||
msg.setSubject(subject, "UTF-8");
|
||||
|
||||
msg.setContent(body, "text/html; charset=utf-8");
|
||||
|
||||
msg.setSentDate(new Date());
|
||||
|
||||
msg.addRecipient(Message.RecipientType.CC, new InternetAddress(""));
|
||||
|
||||
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(toEmail, false));
|
||||
System.out.println("Message is ready");
|
||||
Transport.send(msg);
|
||||
|
||||
System.out.println("EMail Sent Successfully!!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendEmailWithCC(
|
||||
MailAccountService mailAccountService,
|
||||
String toEmail,
|
||||
String subject,
|
||||
String body,
|
||||
String cc1,
|
||||
String cc2) {
|
||||
System.out.println("TLSEmail Start");
|
||||
Properties props = new Properties();
|
||||
|
||||
final String fromEmail = mailAccountService.getDefaultSender().getLogin().toString();
|
||||
final String password = mailAccountService.getDefaultSender().getPassword().toString();
|
||||
props.put("mail.smtp.host", mailAccountService.getDefaultSender().getHost());
|
||||
props.put("mail.smtp.port", mailAccountService.getDefaultSender().getPort());
|
||||
props.put("mail.smtp.auth", "true");
|
||||
props.put("mail.smtp.starttls.enable", "true");
|
||||
|
||||
Authenticator auth =
|
||||
new Authenticator() {
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(fromEmail, password);
|
||||
}
|
||||
};
|
||||
Session session = Session.getInstance(props, auth);
|
||||
try {
|
||||
MimeMessage msg = new MimeMessage(session);
|
||||
// set message headers
|
||||
msg.addHeader("Content-type", "text/HTML; charset=UTF-8");
|
||||
msg.addHeader("format", "flowed");
|
||||
msg.addHeader("Content-Transfer-Encoding", "8bit");
|
||||
|
||||
msg.setFrom(new InternetAddress(fromEmail, "ERP SOPHAL"));
|
||||
|
||||
msg.setReplyTo(InternetAddress.parse(fromEmail, false));
|
||||
|
||||
msg.setSubject(subject, "UTF-8");
|
||||
|
||||
msg.setContent(body, "text/html; charset=utf-8");
|
||||
|
||||
msg.setSentDate(new Date());
|
||||
|
||||
msg.addRecipient(Message.RecipientType.CC, new InternetAddress(cc1));
|
||||
msg.addRecipient(Message.RecipientType.CC, new InternetAddress(cc2));
|
||||
|
||||
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(toEmail, false));
|
||||
System.out.println("Message is ready");
|
||||
Transport.send(msg);
|
||||
|
||||
System.out.println("EMail Sent Successfully!!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package com.axelor.apps.purchase.web;
|
||||
|
||||
import com.axelor.apps.purchase.db.ImportationFolder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLine;
|
||||
import com.axelor.apps.purchase.db.repo.ImportationFolderRepository;
|
||||
import com.axelor.apps.purchase.service.ImportationFolderService;
|
||||
import com.axelor.apps.purchase.service.ImportationFolderServiceImpl;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.google.inject.Singleton;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.List;
|
||||
import wslite.json.JSONException;
|
||||
|
||||
@Singleton
|
||||
public class ImportationFolderController {
|
||||
public void draftImportationFolder(ActionRequest request, ActionResponse response) {
|
||||
ImportationFolder importationFolder = request.getContext().asType(ImportationFolder.class);
|
||||
Beans.get(ImportationFolderService.class).draftImportationFolder(importationFolder);
|
||||
}
|
||||
|
||||
public void openImportationFolder(ActionRequest request, ActionResponse response)
|
||||
throws AxelorException {
|
||||
ImportationFolder importationFolder = request.getContext().asType(ImportationFolder.class);
|
||||
Beans.get(ImportationFolderService.class).openImportationFolder(importationFolder);
|
||||
}
|
||||
|
||||
public void closeImportationFolder(ActionRequest request, ActionResponse response) {
|
||||
ImportationFolder importationFolder = request.getContext().asType(ImportationFolder.class);
|
||||
Beans.get(ImportationFolderService.class).closeImportationFolder(importationFolder);
|
||||
}
|
||||
|
||||
public void cancelImportationFolder(ActionRequest request, ActionResponse response) {
|
||||
ImportationFolder importationFolder = request.getContext().asType(ImportationFolder.class);
|
||||
Beans.get(ImportationFolderService.class).cancelImportationFolder(importationFolder);
|
||||
}
|
||||
|
||||
public void calculateSum(ActionRequest request, ActionResponse response)
|
||||
throws MalformedURLException, JSONException, AxelorException {
|
||||
|
||||
ImportationFolder iimportationFolder =
|
||||
(ImportationFolder) request.getContext().asType(ImportationFolder.class);
|
||||
ImportationFolder importationFolder =
|
||||
Beans.get(ImportationFolderRepository.class).find(iimportationFolder.getId());
|
||||
List<PurchaseOrder> purchaseOrders = importationFolder.getPurchaseOrderList();
|
||||
|
||||
Beans.get(ImportationFolderServiceImpl.class).calculateSum(purchaseOrders, importationFolder);
|
||||
}
|
||||
|
||||
public void calculateAvgPrice(ActionRequest request, ActionResponse response)
|
||||
throws MalformedURLException, JSONException, AxelorException {
|
||||
|
||||
ImportationFolder iimportationFolder =
|
||||
(ImportationFolder) request.getContext().asType(ImportationFolder.class);
|
||||
ImportationFolder importationFolder =
|
||||
Beans.get(ImportationFolderRepository.class).find(iimportationFolder.getId());
|
||||
List<PurchaseOrderLine> purchaseOrderLines = importationFolder.getPurchaseOrderLineList();
|
||||
|
||||
Beans.get(ImportationFolderServiceImpl.class)
|
||||
.calculateAvgPrice(purchaseOrderLines, importationFolder);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,729 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.web;
|
||||
|
||||
import com.axelor.apps.account.db.PaymentMode;
|
||||
import com.axelor.apps.base.db.BankDetails;
|
||||
import com.axelor.apps.base.db.Company;
|
||||
import com.axelor.apps.base.db.Currency;
|
||||
import com.axelor.apps.base.db.Partner;
|
||||
import com.axelor.apps.base.db.PriceList;
|
||||
import com.axelor.apps.base.db.PrintingSettings;
|
||||
import com.axelor.apps.base.db.TradingName;
|
||||
import com.axelor.apps.base.db.Wizard;
|
||||
import com.axelor.apps.base.db.repo.BlockingRepository;
|
||||
import com.axelor.apps.base.db.repo.PartnerRepository;
|
||||
import com.axelor.apps.base.db.repo.PriceListRepository;
|
||||
import com.axelor.apps.base.service.BankDetailsService;
|
||||
import com.axelor.apps.base.service.BlockingService;
|
||||
import com.axelor.apps.base.service.PartnerPriceListService;
|
||||
import com.axelor.apps.base.service.TradingNameService;
|
||||
import com.axelor.apps.purchase.db.ImportationFolder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.PurchaseRequest;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseRequestRepository;
|
||||
import com.axelor.apps.purchase.exception.IExceptionMessage;
|
||||
import com.axelor.apps.purchase.service.PurchaseOrderService;
|
||||
import com.axelor.apps.purchase.service.PurchaseOrderServiceImpl;
|
||||
import com.axelor.apps.purchase.service.print.PurchaseOrderPrintService;
|
||||
import com.axelor.apps.report.engine.ReportSettings;
|
||||
import com.axelor.apps.tool.StringTool;
|
||||
import com.axelor.common.ObjectUtils;
|
||||
import com.axelor.db.JPA;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.exception.db.repo.TraceBackRepository;
|
||||
import com.axelor.exception.service.TraceBackService;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.meta.schema.actions.ActionView;
|
||||
import com.axelor.meta.schema.actions.ActionView.ActionViewBuilder;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.axelor.rpc.Context;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.inject.Singleton;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Nullable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import wslite.json.JSONException;
|
||||
|
||||
@Singleton
|
||||
public class PurchaseOrderController {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
public void setSequence(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
|
||||
if (purchaseOrder != null && purchaseOrder.getCompany() != null) {
|
||||
|
||||
response.setValue(
|
||||
"purchaseOrderSeq",
|
||||
Beans.get(PurchaseOrderService.class).getSequence(purchaseOrder.getCompany()));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void compute(ActionRequest request, ActionResponse response) {
|
||||
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
|
||||
if (purchaseOrder != null) {
|
||||
try {
|
||||
purchaseOrder = Beans.get(PurchaseOrderService.class).computePurchaseOrder(purchaseOrder);
|
||||
response.setValues(purchaseOrder);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void validateSupplier(ActionRequest request, ActionResponse response) {
|
||||
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
|
||||
response.setValue(
|
||||
"supplierPartner", Beans.get(PurchaseOrderService.class).validateSupplier(purchaseOrder));
|
||||
}
|
||||
|
||||
public void setStandByPurchaseOrder(ActionRequest request, ActionResponse response) {
|
||||
|
||||
String raison = (String) request.getContext().get("standbyRaison");
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
Beans.get(PurchaseOrderService.class).setStandByPurchaseOrder(purchaseOrder, raison);
|
||||
response.setReload(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called from grid or form purchase order view, print selected purchase order.
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void showPurchaseOrder(ActionRequest request, ActionResponse response) {
|
||||
|
||||
Context context = request.getContext();
|
||||
String fileLink;
|
||||
String title;
|
||||
PurchaseOrderPrintService purchaseOrderPrintService =
|
||||
Beans.get(PurchaseOrderPrintService.class);
|
||||
|
||||
try {
|
||||
if (!ObjectUtils.isEmpty(request.getContext().get("_ids"))) {
|
||||
List<Long> ids =
|
||||
Lists.transform(
|
||||
(List) request.getContext().get("_ids"),
|
||||
new Function<Object, Long>() {
|
||||
@Nullable
|
||||
@Override
|
||||
public Long apply(@Nullable Object input) {
|
||||
return Long.parseLong(input.toString());
|
||||
}
|
||||
});
|
||||
fileLink = purchaseOrderPrintService.printPurchaseOrders(ids);
|
||||
title = I18n.get("Purchase orders");
|
||||
} else if (context.get("id") != null) {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
title = purchaseOrderPrintService.getFileName(purchaseOrder);
|
||||
fileLink =
|
||||
purchaseOrderPrintService.printPurchaseOrder(purchaseOrder, ReportSettings.FORMAT_PDF);
|
||||
logger.debug("Printing " + title);
|
||||
} else {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_MISSING_FIELD,
|
||||
I18n.get(IExceptionMessage.NO_PURCHASE_ORDER_SELECTED_FOR_PRINTING));
|
||||
}
|
||||
response.setView(ActionView.define(title).add("html", fileLink).map());
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void requestPurchaseOrder(ActionRequest request, ActionResponse response) {
|
||||
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
|
||||
try {
|
||||
Beans.get(PurchaseOrderService.class)
|
||||
.requestPurchaseOrder(
|
||||
Beans.get(PurchaseOrderRepository.class).find(purchaseOrder.getId()));
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateCostPrice(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
Beans.get(PurchaseOrderService.class)
|
||||
.updateCostPrice(Beans.get(PurchaseOrderRepository.class).find(purchaseOrder.getId()));
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
// Generate single purchase order from several
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public void mergePurchaseOrder(ActionRequest request, ActionResponse response) {
|
||||
List<PurchaseOrder> purchaseOrderList = new ArrayList<PurchaseOrder>();
|
||||
List<Long> purchaseOrderIdList = new ArrayList<Long>();
|
||||
boolean fromPopup = false;
|
||||
|
||||
if (request.getContext().get("purchaseOrderToMerge") != null) {
|
||||
|
||||
if (request.getContext().get("purchaseOrderToMerge") instanceof List) {
|
||||
// No confirmation popup, purchase orders are content in a parameter list
|
||||
List<Map> purchaseOrderMap = (List<Map>) request.getContext().get("purchaseOrderToMerge");
|
||||
for (Map map : purchaseOrderMap) {
|
||||
purchaseOrderIdList.add(new Long((Integer) map.get("id")));
|
||||
}
|
||||
} else {
|
||||
// After confirmation popup, purchase order's id are in a string separated by
|
||||
// ","
|
||||
String purchaseOrderIdListStr = (String) request.getContext().get("purchaseOrderToMerge");
|
||||
for (String purchaseOrderId : purchaseOrderIdListStr.split(",")) {
|
||||
purchaseOrderIdList.add(new Long(purchaseOrderId));
|
||||
}
|
||||
fromPopup = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if currency, supplierPartner, company and tradingName are the same for
|
||||
// all selected
|
||||
// purchase orders
|
||||
Currency commonCurrency = null;
|
||||
Partner commonSupplierPartner = null;
|
||||
Company commonCompany = null;
|
||||
Partner commonContactPartner = null;
|
||||
TradingName commonTradingName = null;
|
||||
// Useful to determine if a difference exists between contact partners of all
|
||||
// purchase orders
|
||||
boolean existContactPartnerDiff = false;
|
||||
PriceList commonPriceList = null;
|
||||
// Useful to determine if a difference exists between price lists of all
|
||||
// purchase orders
|
||||
boolean existPriceListDiff = false;
|
||||
PurchaseOrder purchaseOrderTemp;
|
||||
boolean allTradingNamesAreNull = true;
|
||||
boolean eqStatusSelect = true;
|
||||
int statusSelect = -1;
|
||||
int count = 1;
|
||||
for (Long purchaseOrderId : purchaseOrderIdList) {
|
||||
purchaseOrderTemp = JPA.em().find(PurchaseOrder.class, purchaseOrderId);
|
||||
purchaseOrderList.add(purchaseOrderTemp);
|
||||
if (count == 1) {
|
||||
commonCurrency = purchaseOrderTemp.getCurrency();
|
||||
commonSupplierPartner = purchaseOrderTemp.getSupplierPartner();
|
||||
commonCompany = purchaseOrderTemp.getCompany();
|
||||
commonContactPartner = purchaseOrderTemp.getContactPartner();
|
||||
commonPriceList = purchaseOrderTemp.getPriceList();
|
||||
commonTradingName = purchaseOrderTemp.getTradingName();
|
||||
allTradingNamesAreNull = commonTradingName == null;
|
||||
statusSelect = purchaseOrderTemp.getStatusSelect();
|
||||
|
||||
} else {
|
||||
if (purchaseOrderTemp.getStatusSelect() != statusSelect) {
|
||||
eqStatusSelect = false;
|
||||
}
|
||||
if (commonCurrency != null && !commonCurrency.equals(purchaseOrderTemp.getCurrency())) {
|
||||
commonCurrency = null;
|
||||
}
|
||||
if (commonSupplierPartner != null
|
||||
&& !commonSupplierPartner.equals(purchaseOrderTemp.getSupplierPartner())) {
|
||||
commonSupplierPartner = null;
|
||||
}
|
||||
if (commonCompany != null && !commonCompany.equals(purchaseOrderTemp.getCompany())) {
|
||||
commonCompany = null;
|
||||
}
|
||||
if (commonContactPartner != null
|
||||
&& !commonContactPartner.equals(purchaseOrderTemp.getContactPartner())) {
|
||||
commonContactPartner = null;
|
||||
existContactPartnerDiff = true;
|
||||
}
|
||||
if (commonPriceList != null && !commonPriceList.equals(purchaseOrderTemp.getPriceList())) {
|
||||
commonPriceList = null;
|
||||
existPriceListDiff = true;
|
||||
}
|
||||
if (!Objects.equals(commonTradingName, purchaseOrderTemp.getTradingName())) {
|
||||
commonTradingName = null;
|
||||
allTradingNamesAreNull = false;
|
||||
}
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
StringBuilder fieldErrors = new StringBuilder();
|
||||
if (commonCurrency == null) {
|
||||
fieldErrors.append(I18n.get(IExceptionMessage.PURCHASE_ORDER_MERGE_ERROR_CURRENCY));
|
||||
}
|
||||
if (commonSupplierPartner == null) {
|
||||
if (fieldErrors.length() > 0) {
|
||||
fieldErrors.append("<br/>");
|
||||
}
|
||||
fieldErrors.append(I18n.get(IExceptionMessage.PURCHASE_ORDER_MERGE_ERROR_SUPPLIER_PARTNER));
|
||||
}
|
||||
if (commonCompany == null) {
|
||||
if (fieldErrors.length() > 0) {
|
||||
fieldErrors.append("<br/>");
|
||||
}
|
||||
fieldErrors.append(I18n.get(IExceptionMessage.PURCHASE_ORDER_MERGE_ERROR_COMPANY));
|
||||
}
|
||||
if (commonTradingName == null && !allTradingNamesAreNull) {
|
||||
fieldErrors.append(I18n.get(IExceptionMessage.PURCHASE_ORDER_MERGE_ERROR_TRADING_NAME));
|
||||
}
|
||||
if (!eqStatusSelect) {
|
||||
fieldErrors.append(I18n.get(IExceptionMessage.PURCHASE_ORDER_MERGE_ERROR_STATUS_SELECT));
|
||||
}
|
||||
|
||||
if (fieldErrors.length() > 0) {
|
||||
response.setFlash(fieldErrors.toString());
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if priceList or contactPartner are content in parameters
|
||||
if (request.getContext().get("priceList") != null) {
|
||||
commonPriceList =
|
||||
JPA.em()
|
||||
.find(
|
||||
PriceList.class,
|
||||
new Long((Integer) ((Map) request.getContext().get("priceList")).get("id")));
|
||||
}
|
||||
if (request.getContext().get("contactPartner") != null) {
|
||||
commonContactPartner =
|
||||
JPA.em()
|
||||
.find(
|
||||
Partner.class,
|
||||
new Long((Integer) ((Map) request.getContext().get("contactPartner")).get("id")));
|
||||
}
|
||||
|
||||
if (!fromPopup && (existContactPartnerDiff || existPriceListDiff)) {
|
||||
// Need to display intermediate screen to select some values
|
||||
ActionViewBuilder confirmView =
|
||||
ActionView.define("Confirm merge purchase order")
|
||||
.model(Wizard.class.getName())
|
||||
.add("form", "purchase-order-merge-confirm-form")
|
||||
.param("popup", "true")
|
||||
.param("show-toolbar", "false")
|
||||
.param("show-confirm", "false")
|
||||
.param("popup-save", "false")
|
||||
.param("forceEdit", "true");
|
||||
|
||||
if (existPriceListDiff) {
|
||||
confirmView.context("contextPriceListToCheck", "true");
|
||||
}
|
||||
if (existContactPartnerDiff) {
|
||||
confirmView.context("contextContactPartnerToCheck", "true");
|
||||
confirmView.context("contextPartnerId", commonSupplierPartner.getId().toString());
|
||||
}
|
||||
|
||||
confirmView.context("purchaseOrderToMerge", Joiner.on(",").join(purchaseOrderIdList));
|
||||
|
||||
response.setView(confirmView.map());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
PurchaseOrder purchaseOrder =
|
||||
Beans.get(PurchaseOrderService.class)
|
||||
.mergePurchaseOrders(
|
||||
purchaseOrderList,
|
||||
commonCurrency,
|
||||
commonSupplierPartner,
|
||||
commonCompany,
|
||||
commonContactPartner,
|
||||
commonPriceList,
|
||||
commonTradingName);
|
||||
if (purchaseOrder != null) {
|
||||
// Open the generated purchase order in a new tab
|
||||
response.setView(
|
||||
ActionView.define("Purchase order")
|
||||
.model(PurchaseOrder.class.getName())
|
||||
.add("grid", "purchase-order-grid")
|
||||
.add("form", "purchase-order-form")
|
||||
.param("forceEdit", "true")
|
||||
.context("_showRecord", String.valueOf(purchaseOrder.getId()))
|
||||
.map());
|
||||
response.setCanClose(true);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
response.setFlash(e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on partner, company or payment change. Fill the bank details with a default value.
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
public void fillCompanyBankDetails(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
PaymentMode paymentMode = (PaymentMode) request.getContext().get("paymentMode");
|
||||
Company company = purchaseOrder.getCompany();
|
||||
Partner partner = purchaseOrder.getSupplierPartner();
|
||||
if (company == null) {
|
||||
return;
|
||||
}
|
||||
if (partner != null) {
|
||||
partner = Beans.get(PartnerRepository.class).find(partner.getId());
|
||||
}
|
||||
BankDetails defaultBankDetails =
|
||||
Beans.get(BankDetailsService.class)
|
||||
.getDefaultCompanyBankDetails(company, paymentMode, partner, null);
|
||||
response.setValue("companyBankDetails", defaultBankDetails);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void validate(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
purchaseOrder = Beans.get(PurchaseOrderRepository.class).find(purchaseOrder.getId());
|
||||
|
||||
Beans.get(PurchaseOrderService.class).validatePurchaseOrder(purchaseOrder);
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void showFare(ActionRequest request, ActionResponse response) {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
purchaseOrder = Beans.get(PurchaseOrderRepository.class).find(purchaseOrder.getId());
|
||||
|
||||
if (purchaseOrder.getImportationType() == 2) {
|
||||
|
||||
ActionViewBuilder confirmView =
|
||||
ActionView.define("Confirm rejection")
|
||||
.model(Wizard.class.getName())
|
||||
.add("form", "amount-to-pay-fare-form")
|
||||
.param("popup", "true")
|
||||
.param("show-toolbar", "false")
|
||||
.param("show-confirm", "false")
|
||||
.param("popup-save", "false")
|
||||
.param("forceEdit", "true");
|
||||
|
||||
confirmView.context("purchaseOrderId", purchaseOrder.getId());
|
||||
response.setView(confirmView.map());
|
||||
}
|
||||
}
|
||||
|
||||
public void validateImportationPurchaseOrder(ActionRequest request, ActionResponse response)
|
||||
throws AxelorException, MalformedURLException, JSONException {
|
||||
|
||||
// if (request.getContext().get("val") == null) {
|
||||
// throw new AxelorException(
|
||||
// TraceBackRepository.CATEGORY_MISSING_FIELD,
|
||||
// I18n.get(IExceptionMessage.NO_PURCHASE_ORDER_SELECTED_FOR_PRINTING));
|
||||
// }
|
||||
|
||||
// BigDecimal val = new BigDecimal(request.getContext().get("val").toString());
|
||||
BigDecimal purchaseOrderId =
|
||||
new BigDecimal(request.getContext().get("purchaseOrderId").toString());
|
||||
|
||||
PurchaseOrder purchaseOrder =
|
||||
Beans.get(PurchaseOrderRepository.class).find(new Long(purchaseOrderId.toString()));
|
||||
|
||||
// Beans.get(PurchaseOrderServiceImpl.class).addFareToImportationFolder(purchaseOrder, val);
|
||||
|
||||
ImportationFolder importationFolder =
|
||||
Beans.get(PurchaseOrderServiceImpl.class).generateImportationFolder(purchaseOrder);
|
||||
|
||||
// Beans.get(PurchaseOrderRepository.class).save(purchaseOrder);
|
||||
|
||||
response.setView(
|
||||
ActionView.define("Importation folder")
|
||||
.model(ImportationFolder.class.getName())
|
||||
.add("grid", "importation-folder-grid")
|
||||
.add("form", "importation-folder-form")
|
||||
.param("forceEdit", "true")
|
||||
.domain("self.id = " + importationFolder.getId())
|
||||
.map());
|
||||
}
|
||||
|
||||
public void validateFromFare(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
|
||||
BigDecimal purchaseOrderId =
|
||||
new BigDecimal(request.getContext().get("purchaseOrderId").toString());
|
||||
PurchaseOrder purchaseOrder =
|
||||
Beans.get(PurchaseOrderRepository.class).find(new Long(purchaseOrderId.toString()));
|
||||
Beans.get(PurchaseOrderService.class).validatePurchaseOrder(purchaseOrder);
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void cancel(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
purchaseOrder = Beans.get(PurchaseOrderRepository.class).find(purchaseOrder.getId());
|
||||
Beans.get(PurchaseOrderService.class).cancelPurchaseOrder(purchaseOrder);
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void refresh(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
purchaseOrder = Beans.get(PurchaseOrderRepository.class).find(purchaseOrder.getId());
|
||||
Beans.get(PurchaseOrderService.class).computePurchaseOrder(purchaseOrder);
|
||||
Beans.get(PurchaseOrderService.class).updateCostPrice(purchaseOrder);
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on printing settings select. Set the domain for {@link PurchaseOrder#printingSettings}
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
public void filterPrintingSettings(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
|
||||
List<PrintingSettings> printingSettingsList =
|
||||
Beans.get(TradingNameService.class)
|
||||
.getPrintingSettingsList(purchaseOrder.getTradingName(), purchaseOrder.getCompany());
|
||||
String domain =
|
||||
String.format(
|
||||
"self.id IN (%s)",
|
||||
!printingSettingsList.isEmpty()
|
||||
? StringTool.getIdListString(printingSettingsList)
|
||||
: "0");
|
||||
|
||||
response.setAttr("printingSettings", "domain", domain);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on trading name change. Set the default value for {@link PurchaseOrder#printingSettings}
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
public void fillDefaultPrintingSettings(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
response.setValue(
|
||||
"printingSettings",
|
||||
Beans.get(TradingNameService.class)
|
||||
.getDefaultPrintingSettings(
|
||||
purchaseOrder.getTradingName(), purchaseOrder.getCompany()));
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called from purchase order form view on partner change. Get the default price list for the
|
||||
* purchase order. Call {@link PartnerPriceListService#getDefaultPriceList(Partner, int)}.
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
public void fillPriceList(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
response.setValue(
|
||||
"priceList",
|
||||
Beans.get(PartnerPriceListService.class)
|
||||
.getDefaultPriceList(
|
||||
purchaseOrder.getSupplierPartner(), PriceListRepository.TYPE_PURCHASE));
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void changePriceListDomain(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
String domain =
|
||||
Beans.get(PartnerPriceListService.class)
|
||||
.getPriceListDomain(
|
||||
purchaseOrder.getSupplierPartner(), PriceListRepository.TYPE_PURCHASE);
|
||||
response.setAttr("priceList", "domain", domain);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void finishPurchaseOrder(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
purchaseOrder = Beans.get(PurchaseOrderRepository.class).find(purchaseOrder.getId());
|
||||
|
||||
Beans.get(PurchaseOrderService.class)
|
||||
.finishPurchaseOrder(purchaseOrder, purchaseOrder.getCancelReasonStr());
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on supplier partner select. Set the domain for the field supplierPartner
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
public void supplierPartnerDomain(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
Company company = purchaseOrder.getCompany();
|
||||
long companyId = company.getPartner() == null ? 0L : company.getPartner().getId();
|
||||
String domain =
|
||||
String.format(
|
||||
"self.id != %d AND self.isContact = false AND self.isSupplier = true", companyId);
|
||||
String blockedPartnerQuery =
|
||||
Beans.get(BlockingService.class)
|
||||
.listOfBlockedPartner(company, BlockingRepository.PURCHASE_BLOCKING);
|
||||
|
||||
if (!Strings.isNullOrEmpty(blockedPartnerQuery)) {
|
||||
domain += String.format(" AND self.id NOT in (%s)", blockedPartnerQuery);
|
||||
}
|
||||
|
||||
domain += " AND :company member of self.companySet";
|
||||
response.setAttr("supplierPartner", "domain", domain);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void cancelReasonPurchaseOrder(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
Beans.get(PurchaseOrderService.class)
|
||||
.cancelReasonPurchaseOrder(
|
||||
Beans.get(PurchaseOrderRepository.class).find(purchaseOrder.getId()),
|
||||
purchaseOrder.getCancelReason(),
|
||||
purchaseOrder.getCancelReasonStr());
|
||||
|
||||
response.setFlash(I18n.get("The purchase order was canceled"));
|
||||
response.setCanClose(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
public void showPurchaseRequest(ActionRequest request, ActionResponse response) {
|
||||
PurchaseOrder purchaseOrder =
|
||||
Beans.get(PurchaseOrderRepository.class)
|
||||
.find(request.getContext().asType(PurchaseOrder.class).getId());
|
||||
|
||||
List<PurchaseRequest> purchaseRequests =
|
||||
Beans.get(PurchaseRequestRepository.class).all().fetch();
|
||||
List<Long> tempPurchaseRequest = new ArrayList<>();
|
||||
|
||||
for (PurchaseRequest purchaseRequest : purchaseRequests) {
|
||||
List<PurchaseOrder> pOrder =
|
||||
purchaseRequest
|
||||
.getPurchaseOrderSet()
|
||||
.stream()
|
||||
.filter((po) -> po.getId() == purchaseOrder.getId())
|
||||
.collect(Collectors.toList());
|
||||
if (pOrder.size() > 0) {
|
||||
tempPurchaseRequest.add(purchaseRequest.getId());
|
||||
}
|
||||
}
|
||||
|
||||
response.setView(
|
||||
ActionView.define("Purchase requests")
|
||||
.model(PurchaseRequest.class.getName())
|
||||
.add("grid", "purchase-request-grid")
|
||||
.add("form", "purchase-request-form")
|
||||
.param("show-toolbar", "false")
|
||||
.param("show-confirm", "false")
|
||||
.param("popup-save", "false")
|
||||
.param("popup", "false")
|
||||
.context("_ids", tempPurchaseRequest)
|
||||
.domain("self.id in (" + Joiner.on(",").join(tempPurchaseRequest) + ")")
|
||||
.map());
|
||||
}
|
||||
|
||||
public void generateImportationFolder(ActionRequest request, ActionResponse response)
|
||||
throws AxelorException {
|
||||
|
||||
PurchaseOrder purchaseOrder =
|
||||
Beans.get(PurchaseOrderRepository.class)
|
||||
.find(request.getContext().asType(PurchaseOrder.class).getId());
|
||||
|
||||
if (purchaseOrder.getCurrency().getId() != 41){
|
||||
|
||||
ImportationFolder importationFolder =
|
||||
Beans.get(PurchaseOrderServiceImpl.class).generateImportationFolder(purchaseOrder);
|
||||
|
||||
purchaseOrder.setImportationFolder(importationFolder);
|
||||
|
||||
// Beans.get(PurchaseOrderRepository.class).save(purchaseOrder);
|
||||
|
||||
response.setView(
|
||||
ActionView.define("Importation folder")
|
||||
.model(ImportationFolder.class.getName())
|
||||
.add("grid", "importation-folder-grid")
|
||||
.add("form", "importation-folder-form")
|
||||
.param("forceEdit", "true")
|
||||
.domain("self.id = " + importationFolder.getId())
|
||||
.map());
|
||||
}
|
||||
}
|
||||
|
||||
public void createPurchaseOrderBarCodeSeq(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);
|
||||
purchaseOrder = Beans.get(PurchaseOrderRepository.class).find(purchaseOrder.getId());
|
||||
Beans.get(PurchaseOrderService.class).createPurchaseOrderBarCodeSeq(purchaseOrder);
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,394 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.web;
|
||||
|
||||
import com.axelor.apps.account.db.TaxLine;
|
||||
import com.axelor.apps.base.db.Company;
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.base.db.repo.BlockingRepository;
|
||||
import com.axelor.apps.base.db.repo.PriceListLineRepository;
|
||||
import com.axelor.apps.base.service.BlockingService;
|
||||
import com.axelor.apps.base.service.tax.FiscalPositionService;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrderLine;
|
||||
import com.axelor.apps.purchase.service.PurchaseOrderLineService;
|
||||
import com.axelor.apps.purchase.service.app.AppPurchaseService;
|
||||
import com.axelor.db.mapper.Mapper;
|
||||
import com.axelor.exception.service.TraceBackService;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.axelor.rpc.Context;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.inject.Singleton;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Singleton
|
||||
public class PurchaseOrderLineController {
|
||||
|
||||
public void compute(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
Context context = request.getContext();
|
||||
PurchaseOrderLine purchaseOrderLine = context.asType(PurchaseOrderLine.class);
|
||||
PurchaseOrder purchaseOrder = this.getPurchaseOrder(context);
|
||||
|
||||
Map<String, BigDecimal> map =
|
||||
Beans.get(PurchaseOrderLineService.class).compute(purchaseOrderLine, purchaseOrder);
|
||||
response.setValues(map);
|
||||
response.setAttr(
|
||||
"priceDiscounted",
|
||||
"hidden",
|
||||
map.getOrDefault("priceDiscounted", BigDecimal.ZERO)
|
||||
.compareTo(
|
||||
purchaseOrder.getInAti()
|
||||
? purchaseOrderLine.getInTaxPrice()
|
||||
: purchaseOrderLine.getPrice())
|
||||
== 0);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void getProductInformation(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrderLineService service = Beans.get(PurchaseOrderLineService.class);
|
||||
|
||||
Context context = request.getContext();
|
||||
PurchaseOrderLine purchaseOrderLine = context.asType(PurchaseOrderLine.class);
|
||||
PurchaseOrder purchaseOrder = this.getPurchaseOrder(context);
|
||||
Product product = purchaseOrderLine.getProduct();
|
||||
|
||||
this.resetProductInformation(response);
|
||||
response.setValues(service.reset(purchaseOrderLine));
|
||||
|
||||
if (purchaseOrder == null || product == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
purchaseOrderLine.setPurchaseOrder(purchaseOrder);
|
||||
service.fill(purchaseOrderLine, purchaseOrder);
|
||||
response.setValues(purchaseOrderLine);
|
||||
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void resetProductInformation(ActionResponse response) {
|
||||
response.setAttr("minQtyNotRespectedLabel", "hidden", true);
|
||||
response.setAttr("multipleQtyNotRespectedLabel", "hidden", true);
|
||||
}
|
||||
|
||||
public void getTaxEquiv(ActionRequest request, ActionResponse response) {
|
||||
|
||||
Context context = request.getContext();
|
||||
PurchaseOrderLine purchaseOrderLine = context.asType(PurchaseOrderLine.class);
|
||||
PurchaseOrder purchaseOrder = getPurchaseOrder(context);
|
||||
|
||||
response.setValue("taxEquiv", null);
|
||||
|
||||
if (purchaseOrder == null
|
||||
|| purchaseOrderLine == null
|
||||
|| purchaseOrder.getSupplierPartner() == null
|
||||
|| purchaseOrderLine.getTaxLine() == null) return;
|
||||
|
||||
response.setValue(
|
||||
"taxEquiv",
|
||||
Beans.get(FiscalPositionService.class)
|
||||
.getTaxEquiv(
|
||||
purchaseOrder.getSupplierPartner().getFiscalPosition(),
|
||||
purchaseOrderLine.getTaxLine().getTax()));
|
||||
}
|
||||
|
||||
public void updateProductInformation(ActionRequest request, ActionResponse response) {
|
||||
|
||||
Context context = request.getContext();
|
||||
|
||||
PurchaseOrderLine purchaseOrderLine = context.asType(PurchaseOrderLine.class);
|
||||
|
||||
PurchaseOrder purchaseOrder = this.getPurchaseOrder(context);
|
||||
|
||||
if (purchaseOrder == null || purchaseOrderLine.getProduct() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
PurchaseOrderLineService purchaseOrderLineService = Beans.get(PurchaseOrderLineService.class);
|
||||
|
||||
BigDecimal price =
|
||||
purchaseOrderLine.getProduct().getInAti()
|
||||
? purchaseOrderLineService.getInTaxUnitPrice(
|
||||
purchaseOrder, purchaseOrderLine, purchaseOrderLine.getTaxLine())
|
||||
: purchaseOrderLineService.getExTaxUnitPrice(
|
||||
purchaseOrder, purchaseOrderLine, purchaseOrderLine.getTaxLine());
|
||||
|
||||
Map<String, Object> catalogInfo =
|
||||
purchaseOrderLineService.updateInfoFromCatalog(purchaseOrder, purchaseOrderLine);
|
||||
|
||||
Product product = purchaseOrderLine.getProduct();
|
||||
String productName = null;
|
||||
String productCode = null;
|
||||
if (catalogInfo != null) {
|
||||
if (catalogInfo.get("price") != null) {
|
||||
price = (BigDecimal) catalogInfo.get("price");
|
||||
}
|
||||
productName =
|
||||
catalogInfo.get("productName") != null
|
||||
? (String) catalogInfo.get("productName")
|
||||
: product.getName();
|
||||
productCode =
|
||||
catalogInfo.get("productCode") != null
|
||||
? (String) catalogInfo.get("productCode")
|
||||
: product.getCode();
|
||||
} else {
|
||||
price = product.getPurchasePrice();
|
||||
productName = product.getName();
|
||||
productCode = product.getCode();
|
||||
}
|
||||
if (purchaseOrderLine.getProductName() == null) {
|
||||
response.setValue("productName", productName);
|
||||
}
|
||||
if (purchaseOrderLine.getProductCode() == null) {
|
||||
response.setValue("productCode", productCode);
|
||||
}
|
||||
|
||||
Map<String, Object> discounts =
|
||||
purchaseOrderLineService.getDiscountsFromPriceLists(
|
||||
purchaseOrder, purchaseOrderLine, price);
|
||||
|
||||
if (discounts != null) {
|
||||
if (discounts.get("price") != null) {
|
||||
price = (BigDecimal) discounts.get("price");
|
||||
}
|
||||
if (purchaseOrderLine.getProduct().getInAti() != purchaseOrder.getInAti()
|
||||
&& (Integer) discounts.get("discountTypeSelect")
|
||||
!= PriceListLineRepository.AMOUNT_TYPE_PERCENT) {
|
||||
response.setValue(
|
||||
"discountAmount",
|
||||
purchaseOrderLineService.convertUnitPrice(
|
||||
purchaseOrderLine.getProduct().getInAti(),
|
||||
purchaseOrderLine.getTaxLine(),
|
||||
(BigDecimal) discounts.get("discountAmount")));
|
||||
} else {
|
||||
response.setValue("discountAmount", discounts.get("discountAmount"));
|
||||
}
|
||||
response.setValue("discountTypeSelect", discounts.get("discountTypeSelect"));
|
||||
}
|
||||
|
||||
if (price.compareTo(
|
||||
purchaseOrderLine.getProduct().getInAti()
|
||||
? purchaseOrderLine.getInTaxPrice()
|
||||
: purchaseOrderLine.getPrice())
|
||||
!= 0) {
|
||||
if (purchaseOrderLine.getProduct().getInAti()) {
|
||||
response.setValue("inTaxPrice", price);
|
||||
response.setValue(
|
||||
"price",
|
||||
purchaseOrderLineService.convertUnitPrice(
|
||||
true, purchaseOrderLine.getTaxLine(), price));
|
||||
} else {
|
||||
response.setValue("price", price);
|
||||
response.setValue(
|
||||
"inTaxPrice",
|
||||
purchaseOrderLineService.convertUnitPrice(
|
||||
false, purchaseOrderLine.getTaxLine(), price));
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the ex. tax unit price of an invoice line from its in. tax unit price.
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
public void updatePrice(ActionRequest request, ActionResponse response) {
|
||||
Context context = request.getContext();
|
||||
|
||||
PurchaseOrderLine purchaseOrderLine = context.asType(PurchaseOrderLine.class);
|
||||
|
||||
try {
|
||||
BigDecimal inTaxPrice = purchaseOrderLine.getInTaxPrice();
|
||||
TaxLine taxLine = purchaseOrderLine.getTaxLine();
|
||||
|
||||
response.setValue(
|
||||
"price",
|
||||
Beans.get(PurchaseOrderLineService.class).convertUnitPrice(true, taxLine, inTaxPrice));
|
||||
} catch (Exception e) {
|
||||
response.setFlash(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the in. tax unit price of an invoice line from its ex. tax unit price.
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
public void updateInTaxPrice(ActionRequest request, ActionResponse response) {
|
||||
Context context = request.getContext();
|
||||
|
||||
PurchaseOrderLine purchaseOrderLine = context.asType(PurchaseOrderLine.class);
|
||||
|
||||
try {
|
||||
BigDecimal exTaxPrice = purchaseOrderLine.getPrice();
|
||||
TaxLine taxLine = purchaseOrderLine.getTaxLine();
|
||||
|
||||
response.setValue(
|
||||
"inTaxPrice",
|
||||
Beans.get(PurchaseOrderLineService.class).convertUnitPrice(false, taxLine, exTaxPrice));
|
||||
} catch (Exception e) {
|
||||
response.setFlash(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void convertUnitPrice(ActionRequest request, ActionResponse response) {
|
||||
|
||||
Context context = request.getContext();
|
||||
|
||||
PurchaseOrderLine purchaseOrderLine = context.asType(PurchaseOrderLine.class);
|
||||
|
||||
PurchaseOrder purchaseOrder = this.getPurchaseOrder(context);
|
||||
|
||||
if (purchaseOrder == null
|
||||
|| purchaseOrderLine.getProduct() == null
|
||||
|| purchaseOrderLine.getPrice() == null
|
||||
|| purchaseOrderLine.getInTaxPrice() == null
|
||||
|| purchaseOrderLine.getTaxLine() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
BigDecimal price = purchaseOrderLine.getPrice();
|
||||
BigDecimal inTaxPrice = price.add(price.multiply(purchaseOrderLine.getTaxLine().getValue()));
|
||||
|
||||
response.setValue("inTaxPrice", inTaxPrice);
|
||||
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public PurchaseOrder getPurchaseOrder(Context context) {
|
||||
|
||||
Context parentContext = context.getParent();
|
||||
PurchaseOrder purchaseOrder = null;
|
||||
|
||||
if (parentContext != null && parentContext.getContextClass() == PurchaseOrder.class) {
|
||||
|
||||
purchaseOrder = parentContext.asType(PurchaseOrder.class);
|
||||
if (!parentContext.getContextClass().toString().equals(PurchaseOrder.class.toString())) {
|
||||
|
||||
PurchaseOrderLine purchaseOrderLine = context.asType(PurchaseOrderLine.class);
|
||||
|
||||
purchaseOrder = purchaseOrderLine.getPurchaseOrder();
|
||||
}
|
||||
|
||||
} else {
|
||||
PurchaseOrderLine purchaseOrderLine = context.asType(PurchaseOrderLine.class);
|
||||
purchaseOrder = purchaseOrderLine.getPurchaseOrder();
|
||||
}
|
||||
|
||||
return purchaseOrder;
|
||||
}
|
||||
|
||||
public void emptyLine(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
PurchaseOrderLine purchaseOrderLine = request.getContext().asType(PurchaseOrderLine.class);
|
||||
if (purchaseOrderLine.getIsTitleLine()) {
|
||||
PurchaseOrderLine newPurchaseOrderLine = new PurchaseOrderLine();
|
||||
newPurchaseOrderLine.setIsTitleLine(true);
|
||||
newPurchaseOrderLine.setQty(BigDecimal.ZERO);
|
||||
newPurchaseOrderLine.setId(purchaseOrderLine.getId());
|
||||
newPurchaseOrderLine.setVersion(purchaseOrderLine.getVersion());
|
||||
response.setValues(Mapper.toMap(purchaseOrderLine));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void checkQty(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
Context context = request.getContext();
|
||||
PurchaseOrderLine purchaseOrderLine = context.asType(PurchaseOrderLine.class);
|
||||
PurchaseOrder purchaseOrder = getPurchaseOrder(context);
|
||||
PurchaseOrderLineService service = Beans.get(PurchaseOrderLineService.class);
|
||||
|
||||
service.checkMinQty(purchaseOrder, purchaseOrderLine, request, response);
|
||||
service.checkMultipleQty(purchaseOrderLine, response);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on supplier partner select. Set the domain for the field supplierPartner
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
public void supplierPartnerDomain(ActionRequest request, ActionResponse response) {
|
||||
PurchaseOrderLine purchaseOrderLine = request.getContext().asType(PurchaseOrderLine.class);
|
||||
|
||||
PurchaseOrder purchaseOrder = purchaseOrderLine.getPurchaseOrder();
|
||||
if (purchaseOrder == null) {
|
||||
purchaseOrder = request.getContext().getParent().asType(PurchaseOrder.class);
|
||||
}
|
||||
Company company = purchaseOrder.getCompany();
|
||||
|
||||
String domain = "";
|
||||
if (Beans.get(AppPurchaseService.class).getAppPurchase().getManageSupplierCatalog()
|
||||
&& purchaseOrderLine.getProduct() != null
|
||||
&& !purchaseOrderLine.getProduct().getSupplierCatalogList().isEmpty()) {
|
||||
domain +=
|
||||
"self.id != "
|
||||
+ company.getPartner().getId()
|
||||
+ " AND self.id IN "
|
||||
+ purchaseOrderLine
|
||||
.getProduct()
|
||||
.getSupplierCatalogList()
|
||||
.stream()
|
||||
.map(s -> s.getSupplierPartner().getId())
|
||||
.collect(Collectors.toList())
|
||||
.toString()
|
||||
.replace('[', '(')
|
||||
.replace(']', ')');
|
||||
|
||||
String blockedPartnerQuery =
|
||||
Beans.get(BlockingService.class)
|
||||
.listOfBlockedPartner(company, BlockingRepository.PURCHASE_BLOCKING);
|
||||
|
||||
if (!Strings.isNullOrEmpty(blockedPartnerQuery)) {
|
||||
domain += String.format(" AND self.id NOT in (%s)", blockedPartnerQuery);
|
||||
}
|
||||
} else {
|
||||
domain += "self.id = 0";
|
||||
}
|
||||
|
||||
domain += " AND " + company.getId() + " in (SELECT id FROM self.companySet)";
|
||||
|
||||
response.setAttr("supplierPartner", "domain", domain);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.web;
|
||||
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.purchase.service.PurchaseProductService;
|
||||
import com.axelor.exception.service.TraceBackService;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
@Singleton
|
||||
public class PurchaseProductController {
|
||||
|
||||
/**
|
||||
* Called from product form view, on {@link Product#defShipCoefByPartner} change. Call {@link
|
||||
* PurchaseProductService#getLastShippingCoef(Product)}.
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
public void fillShippingCoeff(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
Product product = request.getContext().asType(Product.class);
|
||||
if (!product.getDefShipCoefByPartner()) {
|
||||
return;
|
||||
}
|
||||
response.setValue(
|
||||
"shippingCoef", Beans.get(PurchaseProductService.class).getLastShippingCoef(product));
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,291 @@
|
||||
/*
|
||||
* Axelor Business Solutions
|
||||
*
|
||||
* Copyright (C) 2019 Axelor (<http://axelor.com>).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.axelor.apps.purchase.web;
|
||||
|
||||
import com.axelor.apps.message.service.MailAccountService;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.PurchaseRequest;
|
||||
import com.axelor.apps.purchase.db.PurchaseRequestLine;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseRequestLineRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseRequestRepository;
|
||||
import com.axelor.apps.purchase.exception.IExceptionMessage;
|
||||
import com.axelor.apps.purchase.service.PurchaseRequestService;
|
||||
import com.axelor.apps.purchase.service.print.PurchaseRequestPrintService;
|
||||
import com.axelor.apps.report.engine.ReportSettings;
|
||||
import com.axelor.apps.tool.StringTool;
|
||||
import com.axelor.auth.AuthUtils;
|
||||
import com.axelor.auth.db.User;
|
||||
import com.axelor.auth.db.repo.UserRepository;
|
||||
import com.axelor.common.ObjectUtils;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.exception.db.repo.TraceBackRepository;
|
||||
import com.axelor.exception.service.TraceBackService;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.mail.db.repo.MailFollowerRepository;
|
||||
import com.axelor.meta.CallMethod;
|
||||
import com.axelor.meta.schema.actions.ActionView;
|
||||
import com.axelor.meta.schema.actions.ActionView.ActionViewBuilder;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.axelor.rpc.Context;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Nullable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import wslite.json.JSONException;
|
||||
import wslite.json.JSONObject;
|
||||
|
||||
@Singleton
|
||||
public class PurchaseRequestController {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
@Inject private MailAccountService mailAccountService;
|
||||
|
||||
public void confirmCart(ActionRequest request, ActionResponse response) {
|
||||
Beans.get(PurchaseRequestService.class).confirmCart();
|
||||
response.setReload(true);
|
||||
}
|
||||
|
||||
public void acceptRequest(ActionRequest request, ActionResponse response) {
|
||||
|
||||
if (request.getContext().get("_ids") == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<Long> requestIds = (List<Long>) request.getContext().get("_ids");
|
||||
|
||||
if (!requestIds.isEmpty()) {
|
||||
List<PurchaseRequest> purchaseRequests =
|
||||
Beans.get(PurchaseRequestRepository.class)
|
||||
.all()
|
||||
.filter("self.id in (?1)", requestIds)
|
||||
.fetch();
|
||||
|
||||
Beans.get(PurchaseRequestService.class).acceptRequest(purchaseRequests);
|
||||
|
||||
response.setReload(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void generatePo(ActionRequest request, ActionResponse response) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Long> requestIds = (List<Long>) request.getContext().get("_ids");
|
||||
Boolean groupBySupplier = (Boolean) request.getContext().get("groupBySupplier");
|
||||
groupBySupplier = groupBySupplier == null ? false : groupBySupplier;
|
||||
Boolean groupByProduct = (Boolean) request.getContext().get("groupByProduct");
|
||||
groupByProduct = groupByProduct == null ? false : groupByProduct;
|
||||
if (requestIds != null && !requestIds.isEmpty()) {
|
||||
try {
|
||||
List<PurchaseRequest> purchaseRequests =
|
||||
Beans.get(PurchaseRequestRepository.class)
|
||||
.all()
|
||||
.filter("self.id in (?1)", requestIds)
|
||||
.fetch();
|
||||
// sophal
|
||||
int condition = 0;
|
||||
String message = "";
|
||||
for (PurchaseRequest result : purchaseRequests) {
|
||||
if (result.getStatusSelect() != 5) {
|
||||
condition = 1;
|
||||
message = "purchase request not approved";
|
||||
break;
|
||||
}
|
||||
// int limitPo = result.getLimitPo();
|
||||
|
||||
if (!result.getCanDuplicatePo() && result.getPurchaseOrderSet().size() > 0) {
|
||||
condition = 1;
|
||||
message = "you have already generated this purchase request";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (condition == 0) {
|
||||
List<String> purchaseRequestSeqs =
|
||||
purchaseRequests
|
||||
.stream()
|
||||
.filter(pr -> pr.getSupplierUser() == null)
|
||||
.map(PurchaseRequest::getPurchaseRequestSeq)
|
||||
.collect(Collectors.toList());
|
||||
if (purchaseRequestSeqs != null && !purchaseRequestSeqs.isEmpty()) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_CONFIGURATION_ERROR,
|
||||
I18n.get(IExceptionMessage.PURCHASE_REQUEST_MISSING_SUPPLIER_USER),
|
||||
purchaseRequestSeqs.toString());
|
||||
}
|
||||
response.setCanClose(true);
|
||||
List<PurchaseOrder> purchaseOrderList =
|
||||
Beans.get(PurchaseRequestService.class)
|
||||
.generatePo(purchaseRequests, groupBySupplier, groupByProduct);
|
||||
ActionViewBuilder actionViewBuilder =
|
||||
ActionView.define(
|
||||
String.format(
|
||||
"Purchase Order%s generated", (purchaseOrderList.size() > 1 ? "s" : "")))
|
||||
.model(PurchaseOrder.class.getName())
|
||||
.add("grid", "purchase-order-quotation-grid")
|
||||
.add("form", "purchase-order-form")
|
||||
.context("_showSingle", true)
|
||||
.domain(
|
||||
String.format(
|
||||
"self.id in (%s)", StringTool.getIdListString(purchaseOrderList)));
|
||||
response.setView(actionViewBuilder.map());
|
||||
|
||||
} else {
|
||||
response.setAlert(I18n.get(message));
|
||||
}
|
||||
|
||||
} catch (AxelorException e) {
|
||||
response.setFlash(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void purchaseRequestsAssignedToUser(ActionRequest request, ActionResponse response) {
|
||||
|
||||
List<Long> requestIds = (List<Long>) request.getContext().get("_ids");
|
||||
// User user = (User) request.getContext().get("assignedToUser");
|
||||
HashSet<User> users = (HashSet<User>) request.getContext().get("buyers");
|
||||
Boolean canDuplicatePO = (Boolean) request.getContext().get("canDuplicatePO");
|
||||
int limitPo = (int) request.getContext().get("limitPo");
|
||||
|
||||
if (requestIds != null && !requestIds.isEmpty()) {
|
||||
Beans.get(PurchaseRequestService.class)
|
||||
.purchaseRequestsAssignedToUser(requestIds, users, canDuplicatePO, limitPo);
|
||||
response.setCanClose(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called from grid or form purchase order view, print selected purchase order.
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void showPurchaseRequest(ActionRequest request, ActionResponse response) {
|
||||
|
||||
Context context = request.getContext();
|
||||
String fileLink;
|
||||
String title;
|
||||
PurchaseRequestPrintService purchaseRequestPrintService =
|
||||
Beans.get(PurchaseRequestPrintService.class);
|
||||
|
||||
try {
|
||||
if (!ObjectUtils.isEmpty(request.getContext().get("_ids"))) {
|
||||
List<Long> ids =
|
||||
Lists.transform(
|
||||
(List) request.getContext().get("_ids"),
|
||||
new Function<Object, Long>() {
|
||||
@Nullable
|
||||
@Override
|
||||
public Long apply(@Nullable Object input) {
|
||||
return Long.parseLong(input.toString());
|
||||
}
|
||||
});
|
||||
fileLink = purchaseRequestPrintService.printPurchaseRequests(ids);
|
||||
title = I18n.get("Purchase requests");
|
||||
} else if (context.get("id") != null) {
|
||||
PurchaseRequest purchaseRequest = request.getContext().asType(PurchaseRequest.class);
|
||||
title = purchaseRequestPrintService.getFileName(purchaseRequest);
|
||||
fileLink =
|
||||
purchaseRequestPrintService.printPurchaseRequest(
|
||||
purchaseRequest, ReportSettings.FORMAT_PDF);
|
||||
logger.debug("Printing " + title);
|
||||
} else {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_MISSING_FIELD,
|
||||
I18n.get(IExceptionMessage.NO_PURCHASE_REQUEST_SELECTED_FOR_PRINTING));
|
||||
}
|
||||
response.setView(ActionView.define(title).add("html", fileLink).map());
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void followPurchaseRequest(ActionRequest request, ActionResponse response)
|
||||
throws JSONException {
|
||||
Long id = request.getContext().asType(PurchaseRequest.class).getId();
|
||||
PurchaseRequest purchaseRequest = Beans.get(PurchaseRequestRepository.class).find(id);
|
||||
Beans.get(MailFollowerRepository.class).follow(purchaseRequest, AuthUtils.getUser());
|
||||
|
||||
JSONObject obj = new JSONObject(purchaseRequest.getAttrs());
|
||||
JSONObject superiorId = obj.getJSONObject("superior_user");
|
||||
|
||||
User sup = Beans.get(UserRepository.class).find(superiorId.getLong("id"));
|
||||
|
||||
Beans.get(MailFollowerRepository.class).follow(purchaseRequest, sup);
|
||||
}
|
||||
|
||||
@CallMethod
|
||||
public void sendEmail(String email, String subject, String body) {
|
||||
EmailUtil.sendEmail(mailAccountService, email, subject, body);
|
||||
}
|
||||
|
||||
public void checkProductFamily(ActionRequest request, ActionResponse response)
|
||||
throws AxelorException {
|
||||
|
||||
Long id = request.getContext().asType(PurchaseRequest.class).getId();
|
||||
PurchaseRequest purchaseRequest = Beans.get(PurchaseRequestRepository.class).find(id);
|
||||
String productFamily = purchaseRequest.getFamilleProduit().getName().toString();
|
||||
Integer size = 0;
|
||||
|
||||
List<PurchaseRequestLine> purchaseRequestLines =
|
||||
Beans.get(PurchaseRequestLineRepository.class)
|
||||
.all()
|
||||
.filter("self.newProduct = ?1 and self.purchaseRequest = ?2", false, id)
|
||||
.fetch();
|
||||
|
||||
if (purchaseRequestLines != null) {
|
||||
|
||||
size =
|
||||
purchaseRequestLines
|
||||
.stream()
|
||||
.collect(Collectors.groupingBy(fa -> fa.getProduct().getFamilleProduit()))
|
||||
.size();
|
||||
}
|
||||
if (size > 1) {
|
||||
response.setError(
|
||||
I18n.get("Lines of expression of needs are not of the same family :") + productFamily);
|
||||
// return;
|
||||
}
|
||||
if (size == 1) {
|
||||
long idOfFamily =
|
||||
purchaseRequestLines
|
||||
.stream()
|
||||
.collect(Collectors.groupingBy(fa -> fa.getProduct().getFamilleProduit().getId()))
|
||||
.keySet()
|
||||
.stream()
|
||||
.collect(Collectors.toList())
|
||||
.get(0);
|
||||
|
||||
if (purchaseRequest.getFamilleProduit().getId() != idOfFamily) {
|
||||
response.setError(
|
||||
I18n.get("Lines of expression of needs are not of the same family :") + productFamily);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
"importId";"code";"name";"nextNum";"padding";"prefixe";"suffixe";"toBeAdded";"yearlyResetOk"
|
||||
3;"purchaseOrder";"RFQ/Quotes for Suppliers";1;4;"PO";;1;0
|
||||
|
@ -0,0 +1,2 @@
|
||||
"importId";"code";"name";"nextNum";"padding";"prefixe";"suffixe";"toBeAdded";"yearlyResetOk"
|
||||
3;"purchaseOrder";"Cotations/Cmde fournisseur";1;4;"ACH";;1;0
|
||||
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<csv-inputs xmlns="http://axelor.com/xml/ns/data-import"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/data-import http://axelor.com/xml/ns/data-import/data-import_5.2.xsd">
|
||||
|
||||
<input file="base_sequence.csv" separator=";" type="com.axelor.apps.base.db.Sequence" search="self.importId = :importId">
|
||||
<bind to="yearlyResetOk" column="yearlyResetOk" eval="yearlyResetOk == '1' ? true : false"/>
|
||||
<bind to="nextNum" column="nextNum" eval="nextNum?.empty ? '1' : nextNum"/>
|
||||
<bind to="padding" column="padding" eval="padding?.empty ? '1' : padding"/>
|
||||
<bind to="toBeAdded" column="toBeAdded" eval="toBeAdded?.empty ? '1' : toBeAdded"/>
|
||||
<bind to="resetDate" eval="call:com.axelor.apps.base.service.app.AppBaseService:getTodayDate()" />
|
||||
</input>
|
||||
|
||||
</csv-inputs>
|
||||
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<csv-inputs xmlns="http://axelor.com/xml/ns/data-import"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/data-import http://axelor.com/xml/ns/data-import/data-import_5.2.xsd">
|
||||
|
||||
<input file="auth_permission.csv" separator=";" type="com.axelor.auth.db.Permission" search="self.name = :name" call="com.axelor.csv.script.ImportPermission:importPermissionToRole">
|
||||
<bind to="canRead" eval="can_read == 'x' ? 'true' : 'false'"/>
|
||||
<bind to="canWrite" eval="can_write == 'x' ? 'true' : 'false'"/>
|
||||
<bind to="canCreate" eval="can_create == 'x' ? 'true' : 'false'"/>
|
||||
<bind to="canRemove" eval="can_remove == 'x' ? 'true' : 'false'"/>
|
||||
<bind to="canExport" eval="can_export == 'x' ? 'true' : 'false'"/>
|
||||
</input>
|
||||
|
||||
<input file="base_appPurchase.csv" separator=";" type="com.axelor.apps.base.db.AppPurchase" call="com.axelor.csv.script.ImportApp:importApp">
|
||||
<bind column="dependsOn" to="dependsOnSet" search="self.code in :dependsOn" eval="dependsOn.split(',') as List"/>
|
||||
</input>
|
||||
|
||||
<input file="base_appPurchaseRequest.csv" separator=";" type="com.axelor.apps.base.db.AppPurchaseRequest" call="com.axelor.csv.script.ImportApp:importApp">
|
||||
<bind column="dependsOn" to="dependsOnSet" search="self.code in :dependsOn" eval="dependsOn.split(',') as List"/>
|
||||
</input>
|
||||
|
||||
<input file="meta_helpEN.csv" separator=";" type="com.axelor.meta.db.MetaHelp">
|
||||
<bind to="language" eval="'en'" />
|
||||
<bind to="type" eval="'tooltip'" />
|
||||
<bind to="model" eval="com.axelor.inject.Beans.get(com.axelor.meta.db.repo.MetaModelRepository.class).findByName(object)?.getFullName()" column="object" />
|
||||
</input>
|
||||
|
||||
<input file="meta_helpFR.csv" separator=";" type="com.axelor.meta.db.MetaHelp">
|
||||
<bind to="language" eval="'fr'" />
|
||||
<bind to="type" eval="'tooltip'" />
|
||||
<bind to="model" eval="com.axelor.inject.Beans.get(com.axelor.meta.db.repo.MetaModelRepository.class).findByName(object)?.getFullName()" column="object" />
|
||||
</input>
|
||||
|
||||
<input file="meta_metaMenu.csv" separator=";" type="com.axelor.meta.db.MetaMenu" search="self.name = :name" update="true" />
|
||||
|
||||
|
||||
</csv-inputs>
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
"name";"object";"can_read";"can_write";"can_create";"can_remove";"can_export";"condition";"conditionParams";"roleName"
|
||||
"perm.purchase.all";"com.axelor.apps.purchase.db.*";"x";"x";"x";"x";"x";;;"Admin"
|
||||
|
@ -0,0 +1,2 @@
|
||||
"name";"code";"installOrder";"description";"imagePath";"modules";"dependsOn";"sequence"
|
||||
"Purchase";"purchase";5;"Purchase configuration";"app-purchase.png";"axelor-purchase";"base";3
|
||||
|
@ -0,0 +1,2 @@
|
||||
"name";"code";"installOrder";"description";"imagePath";"modules";"dependsOn";"sequence"
|
||||
"Purchase Request";"purchase-request";6;"Purchase Request Configuration";"app-purchase-request.png";"axelor-purchase";"purchase";4
|
||||
|
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 679 B |
@ -0,0 +1,15 @@
|
||||
"module";"object";"view";"field";"help"
|
||||
"axelor-purchase";"PurchaseOrder";"purchase-order-form";"versionNumber";"Version number for the order. It increases when clicking on the ""new version"" button of a ""Requested"" order. "
|
||||
"axelor-purchase";"PurchaseOrder";"purchase-order-form";"priceList";"Enables to specify a price list to be specifically used for this order. This field is automatically filled in if a price list is attached to the partner. "
|
||||
"axelor-purchase";"PurchaseOrder";"purchase-order-form";"isPurchaseParent";"This check-box must be checked if the current command is the parent command. If there is already a parent command, enter it in the ""Initial Command"" field."
|
||||
"axelor-purchase";"PurchaseOrderLine";"purchase-order-line-form";"saleMinPrice";"Minimum recommended sales price, calculated from the product's cost price and multiplying coefficient. "
|
||||
"axelor-purchase";"PurchaseOrderLine";"purchase-order-line-form";"discountTypeSelect";"Enables to choose the type of discount (fixed amount or percentage of per-unit price). This field is automatically filled in if a price list was selected for the order, but can still be specifically modified for the chosen order line. "
|
||||
"axelor-purchase";"PurchaseOrderLine";"purchase-order-line-form";"toInvoice";"Box to be checked in order to specify that the order line is to be charged in the business project. If this box is unchecked, this line will not be taken into account when creating the invoice for the corresponding order. "
|
||||
"axelor-purchase";"AppPurchase";"app-purchase-config-form";"managePurchasesUnits";"This function is useful when the units of purchase of a product from a supplier are different from your sales units (for example, if you buy a product per tonne and sell it to the kilo). In this way, when ordering, the selected product will be directly indicated with its purchase unit, thus avoiding conversion."
|
||||
"axelor-purchase";"AppPurchase";"app-purchase-config-form";"managePurchaseOrderVersion";"This option enables the ability to create multiple versions of a purchase order, allowing you to edit an order to create a new versions and track the history."
|
||||
"axelor-purchase";"AppPurchase";"app-purchase-config-form";"supplierRequestMgt";"This option allows you to activate the management of purchasing requests to suppliers, enabling you to send quotation requests to several suppliers of the same product."
|
||||
"axelor-purchase";"AppPurchase";"app-purchase-config-form";"manageMultiplePurchaseQuantity";"This is an option that allows you to define a product's multiples purchase quantities on the product form. You can in this way define a product that can only be purchased in a certain quantity (for example for a quantity of 5 and 10). If the quantity selected on a purchase order line is different than defined multiples, the line can not be validated, and a message will appear, displaying which are the authorized quantities .
|
||||
"
|
||||
"axelor-purchase";"PurchaseConfig";"purchase-config-form";"purchaseOrderInAtiSelect";"It is possible to choose if in purchase orders the prices are always in WT, always in ATI, by default in WT or by default in ATI. The choices ""by default in WT"" and ""by default in ATI"" leave the possibility of modifying the type of price applied on a case by case basis (via a check box)."
|
||||
"axelor-purchase";"PurchaseConfig";"purchase-config-form";"displayPriceOnQuotationRequest";"If this box is unchecked, displayPriceOnQuotationRequest will not appear on purchase quotation printings."
|
||||
"axelor-purchase";"PurchaseConfig";"purchase-config-form";"priceRequest";"Offers the ability to customize a default message on quotation requests."
|
||||
|
@ -0,0 +1,15 @@
|
||||
"module";"object";"view";"field";"help"
|
||||
"axelor-purchase";"PurchaseOrder";"purchase-order-form";"versionNumber";"Numéro de version de la commande. Celui-ci s'incrémente lorsque l'on utilise le bouton ""nouvelle version"" sur une commande au statut "" demandé """
|
||||
"axelor-purchase";"PurchaseOrder";"purchase-order-form";"priceList";"Permet d'associer une liste de prix à utiliser spécifiquement pour cette commande. Ce champ est rempli automatiquement si une liste de prix est rattachée au tiers. "
|
||||
"axelor-purchase";"PurchaseOrder";"purchase-order-form";"isPurchaseParent";"Cette case doit être cochée si la commande en cours est la commande initiale. S'il existe déjà une commande parente, la renseigner dans le champ ""Cmde initiale""."
|
||||
"axelor-purchase";"PurchaseOrderLine";"purchase-order-line-form";"saleMinPrice";"Prix de vente minimum conseillé, celui-ci est calculé à partir du prix de revient du produit ainsi que du coefficient de gestion associé à celui-ci. "
|
||||
"axelor-purchase";"PurchaseOrderLine";"purchase-order-line-form";"discountTypeSelect";"Permet de choisir le type de remise (en % ou en montant fixe sur le prix unitaire). Ce champ se remplit automatiquement si une liste de prix a été sélectionnée pour la commande, mais reste modifiable spécifiquement pour la ligne en question. "
|
||||
"axelor-purchase";"PurchaseOrderLine";"purchase-order-line-form";"toInvoice";"Case à cocher permettant de signifier que la ligne de commande est à facturer dans l'affaire. Si celle-ci est décochée, cette ligne ne sera pas prise en compte lors de la création de la facture de la commande associée. "
|
||||
"axelor-purchase";"AppPurchase";"app-purchase-config-form";"managePurchasesUnits";"Cette fonction est utile quand les unités d'achat d'un produit à un fournisseur sont différentes de vos unités de vente (par exemple si vous achetez un produit à la tonne et que vous le revendez au kilo). Ainsi lors des commandes fournisseurs, le produit sélectionné sera directement indiqué avec son unité d'achat, évitant ainsi de faire des conversions."
|
||||
"axelor-purchase";"AppPurchase";"app-purchase-config-form";"managePurchaseOrderVersion";"Cette option active la possibilité de créer plusieurs versions d'une commande fournisseur, permettant ainsi de modifier une commande pour en créer une nouvelle version et d'en suivre l'historique."
|
||||
"axelor-purchase";"AppPurchase";"app-purchase-config-form";"supplierRequestMgt";"Cette option permet d'activer la gestion des demandes d'achats aux fournisseurs, permettant d'envoyer à plusieurs fournisseurs d'un même produit des demandes de cotation."
|
||||
"axelor-purchase";"AppPurchase";"app-purchase-config-form";"manageMultiplePurchaseQuantity";"Cette option permet de définir sur la fiche d'un produit des quantités multiples d'achat. Vous pourrez ainsi définir qu'un produit ne peut être acheter que sous certains multiples (par exemple que pour une quantité de 5 et 10). Si la quantité sélectionnée sur une ligne de commande est différente, cette ligne ne pourra être validée et un message apparaitra, indiquant quelles sont les quantités autorisées."
|
||||
"axelor-purchase";"PurchaseConfig";"purchase-config-form";"purchaseOrderInAtiSelect";"Il est possible de choisir si dans les commandes d'achat les prix sont toujours en H.T., toujours en T.T.C, par défaut en H.T. ou par défaut en T.T.C. Les choix ""par défaut en H.T."" et ""par défaut en T.T.C."" laissent la possibilité de modifier au cas par cas (via une case à cocher) le type de prix pratiqué.
|
||||
"
|
||||
"axelor-purchase";"PurchaseConfig";"purchase-config-form";"displayPriceOnQuotationRequest";"Si cette case est décochée, les prix des produits n'apparaitront pas sur les impressions des demandes de devis aux fournisseurs."
|
||||
"axelor-purchase";"PurchaseConfig";"purchase-config-form";"priceRequest";"Vous offre la possibilité de personnaliser un message par défaut sur les demandes de cotation."
|
||||
|
@ -0,0 +1,26 @@
|
||||
"name";"roles.name"
|
||||
"sc-root-purchase";"Admin"
|
||||
"sc-root-purchase-suppliers";"Admin"
|
||||
"sc-root-purchase-contacts";"Admin"
|
||||
"sc-root-purchase-products";"Admin"
|
||||
"sc-root-purchase-quotations";"Admin"
|
||||
"sc-root-purchase-orders";"Admin"
|
||||
"sc-root-purchase-historical";"Admin"
|
||||
"purchase-historical-finished-orders";"Admin"
|
||||
"purchase-historical-canceled-orders";"Admin"
|
||||
"sc-root-purchase-report";"Admin"
|
||||
"purchase-maps-partner-suppliers";"Admin"
|
||||
"sc-root-purchase-request";"Admin"
|
||||
"sc-root-purchase-request-all";"Admin"
|
||||
"sc-root-purchase-request-all-sent";"Admin"
|
||||
"sc-root-purchase-request-all-accepted";"Admin"
|
||||
"sc-root-purchase-conf";"Admin"
|
||||
"sc-root-purchase-conf-partner-price-list";"Admin"
|
||||
"sc-root-purchase-conf-price-list";"Admin"
|
||||
"sc-root-purchase-conf-purchase-request-creator";"Admin"
|
||||
"top-menu-purchase";"Admin"
|
||||
"top-menu-purchase-quotations";"Admin"
|
||||
"top-menu-purchase-purchase-orders";"Admin"
|
||||
"menu-purchase-dashboard-1";"Admin"
|
||||
"menu-purchase-dashboard-2";"Admin"
|
||||
"menu-purchase-dashboard-3";"Admin"
|
||||
|
@ -0,0 +1,2 @@
|
||||
"code";"managePurchasesUnits";"managePurchaseOrderVersion";"manageSupplierCatalog"
|
||||
"purchase";"true";"true";"true"
|
||||
|
@ -0,0 +1,2 @@
|
||||
"importId";"company.importId"
|
||||
3;1
|
||||
|
@ -0,0 +1,16 @@
|
||||
"name";"metaModel.name";"language.importId";"target";"birtTemplate.name";"filePath";"isDefault";"templateContext";"subject";"content";"toRecipients";"ccRecipients";"bccRecipients";"mediaTypeSelect"
|
||||
"Demande de prix";"PurchaseOrder";2;;;;"true";;"Demande de cotation N° $PurchaseOrder.PurchaseOrderSeq$";"<p>Bonjour, </p>
|
||||
|
||||
<p>Vous trouverez ci-joint notre demande de cotation N° $PurchaseOrder.PurchaseOrderSeq$.</p>
|
||||
|
||||
<p>Merci de nous indiquer pour chaque produit le délai de livraison et les conditions de paiements.</p>
|
||||
";"$PurchaseOrder.contactPartner.emailAddress.address$";;;2
|
||||
"Price inquiry";"PurchaseOrder";1;;;;"true";;"Request for quotation N° $PurchaseOrder.PurchaseOrderSeq$";"<p>Good morning,</p>
|
||||
|
||||
<p>Please find attached our request for quotation N° $PurchaseOrder.PurchaseOrderSeq$.</p>
|
||||
|
||||
<p>Can you please indicate to us for each product the expected delivery date and if some products are subjected to special discounts.</p>
|
||||
|
||||
<p>Best regards<br/>
|
||||
$PurchaseOrder.buyerUser.partner.firstName$ $PurchaseOrder.buyerUser.partner.name$</p>
|
||||
";"$PurchaseOrder.contactPartner.emailAddress.address$";;;2
|
||||
|
@ -0,0 +1,2 @@
|
||||
"importId";"name";"code";"company.importId"
|
||||
"1";"Axelor";"AXE";1
|
||||
|
@ -0,0 +1,3 @@
|
||||
"importId";"externalReference";"supplierPartner.importId";"contactPartner.importId";"buyerUser.importId";"currency.code";"creationDate";"statusSelect";"company.importId";"deliveryDate";"orderDate";"paymentMode.importId";"paymentCondition.importId";"invoice.importId";"printingSettings.importId"
|
||||
8;"SO4685";148;148;8;"USD";"TODAY[-7d]";2;1;"TODAY[+7d]";"TODAY[-7d]";15;5;;1
|
||||
9;"V00021510";70;71;14;"EUR";"TODAY";1;1;"TODAY[+14d]";"TODAY";15;2;;1
|
||||
|
@ -0,0 +1,6 @@
|
||||
"importId";"purchaseOrder.importId";"sequence";"product.importId";"productName";"qty";"unit.importId";"price";"inTaxPrice";"priceDiscounted";"taxLine.importId";"exTaxTotal";"desiredDelivDate";"estimatedDelivDate"
|
||||
22;8;1;200;"HARDSHARK SATA 1 To - Ref: 7458764";30;1;45;45;45;24;"1350";"TODAY[+7d]";"TODAY[+7d]"
|
||||
23;8;2;201;"SSDSHARK 100 Go - Ref: 7458897";30;1;"57.6";"57.6";"57.6";24;"1728";"TODAY[+7d]";"TODAY[+7d]"
|
||||
24;9;1;302;"Cartouche jet d'encre FLUID - Ref: C.MH0100";60;1;21;"25.2";21;13;"1260";"TODAY[+14d]";"TODAY[+14d]"
|
||||
25;9;2;303;"Cartouche encre laser POWDER - Ref: C.TH0850";50;1;54;"64.8";54;13;"2700";"TODAY[+14d]";"TODAY[+14d]"
|
||||
26;9;3;304;"Ramette 500 Feuilles A4 Standard 80 g - Ref: P.AS8005";30;1;"4.96";"5.95";"4.96";13;"148.8";"TODAY[+14d]";"TODAY[+14d]"
|
||||
|
@ -0,0 +1,27 @@
|
||||
"product.importId";"supplierPartner.importId";"productSupplierName";"productSupplierCode";"price";"updateDate";"description";"minQty"
|
||||
120;148;"InkJet Printer PRINTO";"IP-PRINTQ";"279.65";"2013-02-01";;5
|
||||
120;170;"PRINTO Inkjet";6541241;"293.6325";"2013-03-15";;1
|
||||
121;148;"Laser Printer PROPRINT";"LP-PROPRINT";"343.2";"2013-02-01";;5
|
||||
121;170;"PROPRINT Laser";6543248;"370.656";"2013-03-15";;1
|
||||
130;170;"LED Screen HD 22 Inch ProViz";7545678;156;"2013-03-15";;1
|
||||
131;170;"LED Screen HD 24 Inch ProViz";7545680;"197.5";"2013-03-15";;1
|
||||
200;148;"HDD HARDSHARK 1 To ";"HD-HSHARK1T";45;"2013-02-01";;5
|
||||
200;170;"HARDSHARK SATA 1 To ";7458764;"47.7";"2013-03-15";;1
|
||||
201;148;"HDD SSDSHARK 100 Go ";"HD-SSHARK100G";"57.6";"2013-02-01";;5
|
||||
201;170;"SSDSHARK 100 Go ";7458897;"62.208";"2013-03-15";;1
|
||||
210;152;"Processor 4x3,4 GHz POWER4CORE";"PROC-651245";"133.2";"2013-04-20";;1
|
||||
211;152;"Processor 6x3,2 GHz POWER6CORE";"PROC-651257";432;"2013-04-20";;1
|
||||
220;148;"Rack Casing";"CS-RACK";"58.8";"2013-02-01";;5
|
||||
230;170;"RAMTOP 8 Go DDR3 ";8000024;"59.2";"2013-03-15";;1
|
||||
231;170;"RAMEXTRA 16 Go DDR3 ";8000026;"121.6";"2013-03-15";;1
|
||||
240;152;"Classic MotherBoard";"MOTH-45678C";114;"2013-04-20";;5
|
||||
241;152;"High Performance MotherBoard";"MOTH-45678HP";195;"2013-04-20";;1
|
||||
250;152;"Power Supply ";"POWS-21471S";"30.4";"2013-04-20";;5
|
||||
300;70;"Set connectique serveur";"C.ER0142";16;"2013-06-01";;10
|
||||
301;70;"Set visserie serveur";"C.RM4571";"2.8";"2013-06-01";;10
|
||||
302;70;"Cartouche jet d'encre FLUID";"C.MH0100";21;"2013-06-01";;20
|
||||
303;70;"Cartouche encre laser POWDER";"C.TH0850";54;"2013-06-01";;20
|
||||
304;70;"Ramette 500 Feuilles A4 Standard 80 g";"P.AS8005";"4.9629";"2013-06-01";;100
|
||||
305;70;"Stylos billes medium (Bte 50)";"F.SM74851";12;"2013-06-01";;10
|
||||
306;70;"Café moulu 250g";"A.CF0005";"2.43";"2013-06-01";;5
|
||||
307;70;"Bouteille Eau (1,5L)";"A.BE0002";"0.675";"2013-06-01";;6
|
||||
|
@ -0,0 +1,2 @@
|
||||
"code";"managePurchasesUnits";"managePurchaseOrderVersion";"manageSupplierCatalog"
|
||||
"purchase";"true";"true";"true"
|
||||
|
@ -0,0 +1,2 @@
|
||||
"importId";"company.importId"
|
||||
3;1
|
||||
|
@ -0,0 +1,16 @@
|
||||
"name";"metaModel.name";"language.importId";"target";"birtTemplate.name";"filePath";"isDefault";"templateContext";"subject";"content";"toRecipients";"ccRecipients";"bccRecipients";"mediaTypeSelect"
|
||||
"Demande de prix";"PurchaseOrder";2;;;;"true";;"Demande de cotation N° $PurchaseOrder.PurchaseOrderSeq$";"<p>Bonjour, </p>
|
||||
|
||||
<p>Vous trouverez ci-joint notre demande de cotation N° $PurchaseOrder.PurchaseOrderSeq$.</p>
|
||||
|
||||
<p>Merci de nous indiquer pour chaque produit le délai de livraison et les conditions de paiements.</p>
|
||||
";"$PurchaseOrder.contactPartner.emailAddress.address$";;;2
|
||||
"Price inquiry";"PurchaseOrder";1;;;;"true";;"Request for quotation N° $PurchaseOrder.PurchaseOrderSeq$";"<p>Good morning,</p>
|
||||
|
||||
<p>Please find attached our request for quotation N° $PurchaseOrder.PurchaseOrderSeq$.</p>
|
||||
|
||||
<p>Can you please indicate to us for each product the expected delivery date and if some products are subjected to special discounts.</p>
|
||||
|
||||
<p>Best regards<br/>
|
||||
$PurchaseOrder.buyerUser.partner.firstName$ $PurchaseOrder.buyerUser.partner.name$</p>
|
||||
";"$PurchaseOrder.contactPartner.emailAddress.address$";;;2
|
||||
|
@ -0,0 +1,2 @@
|
||||
"importId";"name";"code";"company.importId"
|
||||
"1";"Axelor";"AXE";1
|
||||
|
@ -0,0 +1,3 @@
|
||||
"importId";"externalReference";"supplierPartner.importId";"contactPartner.importId";"buyerUser.importId";"currency.code";"creationDate";"statusSelect";"company.importId";"deliveryDate";"orderDate";"paymentMode.importId";"paymentCondition.importId";"invoice.importId";"printingSettings.importId"
|
||||
8;"SO4685";148;148;8;"USD";"TODAY[-7d]";2;1;"TODAY[+7d]";"TODAY[-7d]";15;5;;1
|
||||
9;"V00021510";70;71;14;"EUR";"TODAY";1;1;"TODAY[+14d]";"TODAY";15;2;;1
|
||||
|
@ -0,0 +1,6 @@
|
||||
"importId";"purchaseOrder.importId";"sequence";"product.importId";"productName";"qty";"unit.importId";"price";"inTaxPrice";"priceDiscounted";"taxLine.importId";"exTaxTotal";"desiredDelivDate";"estimatedDelivDate"
|
||||
22;8;1;200;"HARDSHARK SATA 1 To - Ref: 7458764";30;1;45;45;45;24;"1350";"TODAY[+7d]";"TODAY[+7d]"
|
||||
23;8;2;201;"SSDSHARK 100 Go - Ref: 7458897";30;1;"57.6";"57.6";"57.6";24;"1728";"TODAY[+7d]";"TODAY[+7d]"
|
||||
24;9;1;302;"Cartouche jet d'encre FLUID - Ref: C.MH0100";60;1;21;"25.2";21;13;"1260";"TODAY[+14d]";"TODAY[+14d]"
|
||||
25;9;2;303;"Cartouche encre laser POWDER - Ref: C.TH0850";50;1;54;"64.8";54;13;"2700";"TODAY[+14d]";"TODAY[+14d]"
|
||||
26;9;3;304;"Ramette 500 Feuilles A4 Standard 80 g - Ref: P.AS8005";30;1;"4.96";"5.95";"4.96";13;"148.8";"TODAY[+14d]";"TODAY[+14d]"
|
||||
|
@ -0,0 +1,27 @@
|
||||
"product.importId";"supplierPartner.importId";"productSupplierName";"productSupplierCode";"price";"updateDate";"description";"minQty"
|
||||
120;148;"InkJet Printer PRINTO";"IP-PRINTQ";"279.65";"2013-02-01";;5
|
||||
120;170;"PRINTO Inkjet";6541241;"293.6325";"2013-03-15";;1
|
||||
121;148;"Laser Printer PROPRINT";"LP-PROPRINT";"343.2";"2013-02-01";;5
|
||||
121;170;"PROPRINT Laser";6543248;"370.656";"2013-03-15";;1
|
||||
130;170;"LED Screen HD 22 Inch ProViz";7545678;156;"2013-03-15";;1
|
||||
131;170;"LED Screen HD 24 Inch ProViz";7545680;"197.5";"2013-03-15";;1
|
||||
200;148;"HDD HARDSHARK 1 To ";"HD-HSHARK1T";45;"2013-02-01";;5
|
||||
200;170;"HARDSHARK SATA 1 To ";7458764;"47.7";"2013-03-15";;1
|
||||
201;148;"HDD SSDSHARK 100 Go ";"HD-SSHARK100G";"57.6";"2013-02-01";;5
|
||||
201;170;"SSDSHARK 100 Go ";7458897;"62.208";"2013-03-15";;1
|
||||
210;152;"Processor 4x3,4 GHz POWER4CORE";"PROC-651245";"133.2";"2013-04-20";;1
|
||||
211;152;"Processor 6x3,2 GHz POWER6CORE";"PROC-651257";432;"2013-04-20";;1
|
||||
220;148;"Rack Casing";"CS-RACK";"58.8";"2013-02-01";;5
|
||||
230;170;"RAMTOP 8 Go DDR3 ";8000024;"59.2";"2013-03-15";;1
|
||||
231;170;"RAMEXTRA 16 Go DDR3 ";8000026;"121.6";"2013-03-15";;1
|
||||
240;152;"Classic MotherBoard";"MOTH-45678C";114;"2013-04-20";;5
|
||||
241;152;"High Performance MotherBoard";"MOTH-45678HP";195;"2013-04-20";;1
|
||||
250;152;"Power Supply ";"POWS-21471S";"30.4";"2013-04-20";;5
|
||||
300;70;"Set connectique serveur";"C.ER0142";16;"2013-06-01";;10
|
||||
301;70;"Set visserie serveur";"C.RM4571";"2.8";"2013-06-01";;10
|
||||
302;70;"Cartouche jet d'encre FLUID";"C.MH0100";21;"2013-06-01";;20
|
||||
303;70;"Cartouche encre laser POWDER";"C.TH0850";54;"2013-06-01";;20
|
||||
304;70;"Ramette 500 Feuilles A4 Standard 80 g";"P.AS8005";"4.9629";"2013-06-01";;100
|
||||
305;70;"Stylos billes medium (Bte 50)";"F.SM74851";12;"2013-06-01";;10
|
||||
306;70;"Café moulu 250g";"A.CF0005";"2.43";"2013-06-01";;5
|
||||
307;70;"Bouteille Eau (1,5L)";"A.BE0002";"0.675";"2013-06-01";;6
|
||||
|
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<csv-inputs xmlns="http://axelor.com/xml/ns/data-import"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/data-import http://axelor.com/xml/ns/data-import/data-import_5.2.xsd">
|
||||
|
||||
<input file="base_appPurchase.csv" separator=";" type="com.axelor.apps.base.db.AppPurchase" search="self.code = :code"/>
|
||||
|
||||
<input file="purchase_purchaseConfig.csv" separator=";" type="com.axelor.apps.purchase.db.PurchaseConfig" search="self.importId = :importId"/>
|
||||
|
||||
<input file="purchase_purchaseOrder.csv" separator=";" type="com.axelor.apps.purchase.db.PurchaseOrder">
|
||||
<bind to="createdOn" eval="call:com.axelor.csv.script.ImportDateTime:importDateTime(creationDate)" column="creationDate"/>
|
||||
<bind to="deliveryDate" eval="call:com.axelor.csv.script.ImportDateTime:importDate(deliveryDate)" column="deliveryDate"/>
|
||||
<bind to="orderDate" eval="call:com.axelor.csv.script.ImportDateTime:importDate(orderDate)" column="orderDate"/>
|
||||
</input>
|
||||
|
||||
<input file="purchase_purchaseOrderLine.csv" separator=";" type="com.axelor.apps.purchase.db.PurchaseOrderLine" call="com.axelor.apps.purchase.script.ImportPurchaseOrderLine:importPurchaseOrderLine">
|
||||
<bind to="desiredDelivDate" eval="call:com.axelor.csv.script.ImportDateTime:importDateTime(desiredDelivDate)" column="desiredDelivDate"/>
|
||||
<bind to="estimatedDelivDate" eval="call:com.axelor.csv.script.ImportDateTime:importDate(estimatedDelivDate)" column="estimatedDelivDate"/>
|
||||
</input>
|
||||
|
||||
<input file="purchase_supplierCatalog.csv" separator=";" type="com.axelor.apps.purchase.db.SupplierCatalog"/>
|
||||
|
||||
<input file="base_sequence.csv" separator=";" type="com.axelor.apps.base.db.Sequence" search="self.importId = :importId">
|
||||
<bind to="yearlyResetOk" column="yearlyResetOk" eval="yearlyResetOk == '1' ? true : false"/>
|
||||
<bind to="nextNum" column="nextNum" eval="nextNum?.empty ? '1' : nextNum"/>
|
||||
<bind to="padding" column="padding" eval="padding?.empty ? '1' : padding"/>
|
||||
<bind to="toBeAdded" column="toBeAdded" eval="toBeAdded?.empty ? '1' : toBeAdded"/>
|
||||
<bind to="resetDate" eval="call:com.axelor.apps.base.service.app.AppBaseService:getTodayDate()" />
|
||||
</input>
|
||||
|
||||
<input file="purchase_purchaseOrder.csv" separator=";" type="com.axelor.apps.purchase.db.PurchaseOrder" search="self.importId = :importId" call="com.axelor.apps.purchase.script.ImportPurchaseOrder:importPurchaseOrder">
|
||||
<bind to="createdOn" eval="call:com.axelor.csv.script.ImportDateTime:importDateTime(creationDate)" column="creationDate"/>
|
||||
<bind to="deliveryDate" eval="call:com.axelor.csv.script.ImportDateTime:importDate(deliveryDate)" column="deliveryDate"/>
|
||||
<bind to="orderDate" eval="call:com.axelor.csv.script.ImportDateTime:importDate(orderDate)" column="orderDate"/>
|
||||
</input>
|
||||
|
||||
<input file="base_template.csv" separator=";" type="com.axelor.apps.message.db.Template" search="self.name = :name" >
|
||||
<bind to="language" search="self.code = :languageCode"/>
|
||||
</input>
|
||||
|
||||
</csv-inputs>
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="base" package="com.axelor.apps.base.db"/>
|
||||
|
||||
<entity name="ABCAnalysis" lang="java">
|
||||
|
||||
<date name="startDate" title="Start date"/>
|
||||
<date name="endDate" title="End date"/>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="base" package="com.axelor.apps.base.db"/>
|
||||
|
||||
<entity name="AppPurchase" lang="java" extends="App">
|
||||
<boolean name="managePurchaseOrderVersion" title="Manage purchase order versions" default="false"/>
|
||||
<boolean name="managePurchasesUnits" title="Manage purchases unit on products"/>
|
||||
<boolean name="manageMultiplePurchaseQuantity" title="Manage multiple purchase quantity"/>
|
||||
<boolean name="isEnabledProductDescriptionCopy" title="Enable product description copy"/>
|
||||
<boolean name="manageSupplierCatalog" title="Manage supplier catalog"/>
|
||||
<boolean name="isDisplayPurchaseOrderLineNumber" title="Display purchase order line number"/>
|
||||
|
||||
<one-to-many name="usersExludedFromTco" ref="com.axelor.auth.db.User" title="Users Exluded From Tco" />
|
||||
|
||||
<track>
|
||||
<field name="managePurchaseOrderVersion" on="UPDATE"/>
|
||||
<field name="managePurchasesUnits" on="UPDATE"/>
|
||||
<field name="manageMultiplePurchaseQuantity" on="UPDATE"/>
|
||||
<field name="isEnabledProductDescriptionCopy" on="UPDATE"/>
|
||||
<field name="manageSupplierCatalog" on="UPDATE"/>
|
||||
<field name="isDisplayPurchaseOrderLineNumber" on="UPDATE"/>
|
||||
</track>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="base" package="com.axelor.apps.base.db"/>
|
||||
|
||||
<entity name="AppPurchaseRequest" lang="java" cacheable="true" extends="App" />
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity name="BookingService" lang="java">
|
||||
<string name="eventName" />
|
||||
<date name="eventDate" />
|
||||
<string name="eventAddress" />
|
||||
<decimal name="estimatedParticipantNumber" />
|
||||
|
||||
<string name="missionName" />
|
||||
<string name="missionAddress" />
|
||||
<string name="tripPurpose" />
|
||||
|
||||
|
||||
<string name="phoneNumber"/>
|
||||
<string name="emailAddress" title="Email"/>
|
||||
|
||||
<integer name="numberOfRoom" default="1"/>
|
||||
<integer name="roomType" title="Room type" selection="ipurchase.booking.room.type.select" default="1"/>
|
||||
<integer name="accommodationType" title="Accomodation type" selection="ipurchase.booking.accommodation.type.select" default="1"/>
|
||||
<date name="checkInDate" />
|
||||
<date name="checkOutDate" />
|
||||
|
||||
|
||||
<integer name="numberOfTicket" default="1"/>
|
||||
<string name="departurePoint" title="Departure point"/>
|
||||
<date name="departureDate" />
|
||||
<string name="destination" title="Destination"/>
|
||||
|
||||
<!-- <string name="destination" title="Destination"/> -->
|
||||
|
||||
<date name="returnDate" />
|
||||
<string name="returnPoint" title="Return point"/>
|
||||
|
||||
|
||||
|
||||
<integer name="statusSelect" title="Status" readonly="true" selection="ipurchase.booking.status.select" default="1"/>
|
||||
<integer name="serviceType" title="Service type" readonly="true" selection="ipurchase.booking.service.type.select" default="1"/>
|
||||
|
||||
<date name="serviceDate" title="Service date" />
|
||||
|
||||
<many-to-one name="requestedBy" title="Requested By" ref="com.axelor.auth.db.User"/>
|
||||
<date name="requestDate" title="Request date" />
|
||||
<many-to-one name="validatedBy" title="Validated By" ref="com.axelor.auth.db.User"/>
|
||||
<date name="validationDate" title="Validation date" />
|
||||
<many-to-one name="approvedBy" title="Approved By" ref="com.axelor.auth.db.User"/>
|
||||
<date name="approvalDate" title="Approval date" />
|
||||
|
||||
|
||||
<track>
|
||||
<field name="serviceType"/>
|
||||
<field name="statusSelect"/>
|
||||
<field name="requestedBy" />
|
||||
<field name="requestDate" />
|
||||
<field name="validatedBy" />
|
||||
<field name="validationDate" />
|
||||
<field name="approvedBy" />
|
||||
<field name="approvalDate" />
|
||||
</track>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="base" package="com.axelor.apps.base.db"/>
|
||||
|
||||
<entity name="Company" lang="java" cacheable="true">
|
||||
|
||||
<one-to-one name="purchaseConfig" ref="com.axelor.apps.purchase.db.PurchaseConfig" title="Purchase config" mappedBy="company"/>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity name="ImportationDocument" sequential="true" lang="java">
|
||||
|
||||
<many-to-one name="docFile" ref="com.axelor.meta.db.MetaFile" title="Doc file" />
|
||||
<integer name="docType" selection="purchase.importation.folder.doc.type.select" />
|
||||
<string name="notes" large="true" multiline="true" title="Description To Display"/>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity name="ImportationDocumentExtra" sequential="true" lang="java">
|
||||
|
||||
<many-to-one name="docFile" ref="com.axelor.meta.db.MetaFile" title="Doc file" />
|
||||
<integer name="docType" selection="purchase.importation.folder.doc.extra.type.select" />
|
||||
<string name="notes" large="true" multiline="true" title="Description To Display"/>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<sequence name="importation.seq" initial="1" increment="1" padding="5" prefix="DOSIMP"/>
|
||||
|
||||
<entity name="ImportationFolder" sequential="true" lang="java">
|
||||
<string name="name" sequence="importation.seq" title="Ref."/>
|
||||
<integer name="statusSelect" selection="purchase.importation.folder.status.select" readonly="true" default="1" />
|
||||
<one-to-many name="purchaseOrderList" ref="PurchaseOrder" mappedBy="importationFolder" title="Purchase order"/>
|
||||
<one-to-many name="purchaseOrderLineList" ref="PurchaseOrderLine" title="Purchase order line"/>
|
||||
<many-to-one name="forwardingPartner" ref="com.axelor.apps.base.db.Partner" title="Forwarding Partner"/>
|
||||
<many-to-one name="supplierPartner" ref="com.axelor.apps.base.db.Partner" title="Supplier"/>
|
||||
<string name="containerNumber" title="Number Container."/>
|
||||
<!-- DATE D'EMBARQUEMENT -->
|
||||
<date name="boardingDate" title="Boarding date"/>
|
||||
<!-- reception sur site -->
|
||||
<date name="arrivalGoodiDate" title="Arrival goods"/>
|
||||
<!-- reception sur site souhaite -->
|
||||
<date name="requestedArrivalGoodiDate" title="Requested Arrival goods"/>
|
||||
<!-- date reception prevu -->
|
||||
<date name="EstimatedArrivalGoodiDate" title="Estimated Arrival goods"/>
|
||||
|
||||
<date name="arrivalDocDate" title="Arrival Documents"/>
|
||||
<string name="noteArrivalDocDate" large="true" multiline="true" title="Arrival document note"/>
|
||||
|
||||
|
||||
<date name="invoiceDirectDebitDate" title="Invoice direct debit"/>
|
||||
<date name="folderReceptionDate" title="Folder reception date"/>
|
||||
<date name="arrivalNoticeDate" title="Arrival notice date"/>
|
||||
|
||||
<many-to-one name="arrivalNoticeFile" ref="com.axelor.meta.db.MetaFile" title="Arrival notice file" />
|
||||
<one-to-many name="arrivalNoticeFiles" ref="com.axelor.meta.db.MetaFile" title="Arrival notice files" />
|
||||
|
||||
|
||||
<date name="d_10_date" title="Date D10"/>
|
||||
<many-to-one name="d10File" ref="com.axelor.meta.db.MetaFile" title="D10 File" />
|
||||
<one-to-many name="d10Files" ref="com.axelor.meta.db.MetaFile" title="D10 Files" />
|
||||
|
||||
|
||||
<many-to-one name="currency" ref="com.axelor.apps.base.db.Currency" title="Currency"/>
|
||||
<integer name="valorisation" title="Valorisation Type" selection="importation.folder.valorisation.type.select" />
|
||||
<integer name="progress" title="Progress %" min="0" max="100" />
|
||||
<integer name="orderByState"/>
|
||||
|
||||
<decimal name="amount" precision="20" scale="4"/>
|
||||
<decimal name="taxAmount" precision="20" scale="4"/>
|
||||
<decimal name="totalAmount" precision="20" scale="2"/>
|
||||
|
||||
<!-- Notes -->
|
||||
<string name="notes" large="true" multiline="true" title="Description To Display"/>
|
||||
<string name="internalNote" large="true" multiline="true" title="Internal Note"/>
|
||||
|
||||
<!-- <many-to-one name="shipmentMode" ref="com.axelor.apps.stock.db.ShipmentMode"/> -->
|
||||
<!-- <many-to-one name="transportMode" ref="com.axelor.apps.stock.db.FreightCarrierMode" required="true" title="Transport Mode"/> -->
|
||||
|
||||
<date name="transmissionPoToSupplier" title="Date transmission BC au fournisseur" />
|
||||
<string name="priority" selection="purchase.importation.folder.priority.select" default="1" />
|
||||
<string name="label" title="Label" />
|
||||
<!-- Date d'embarqument prevu -->
|
||||
<date name="estimdatedBoardingDate" title="Estimated boarding date" />
|
||||
<date name="liquidation_date" title="Liquidation date" />
|
||||
<date name="reception_sophal_date" title="Sophal Arrival" />
|
||||
<date name="reception_magasin_date" title="Store reception date" />
|
||||
<date name="transmission_dg_date" title="Date transmission a la DG" />
|
||||
|
||||
<date name="delivery_date" title="Estimated delivery date" />
|
||||
|
||||
<boolean name="reception_magasin_status" title="Store received statut" />
|
||||
|
||||
<one-to-many name="importationDocumentList" ref="ImportationDocument" title="Information document" />
|
||||
<one-to-many name="importationCommentList" ref="com.axelor.apps.purchase.db.ImportationComment" mappedBy="importationFolder" title="Comments" />
|
||||
|
||||
<date name="date_liquidation_invoice" title="Date liquidation facture" />
|
||||
<!-- facture fournisseur -->
|
||||
<many-to-one name="supplierInvoice" ref="com.axelor.meta.db.MetaFile" title="Supplier invoice" />
|
||||
|
||||
<!-- numero document de transport -->
|
||||
<string name="lta_number" title="LTA" selection="purchase.importation.folder.lta.selection" />
|
||||
<many-to-one name="ltaFile" ref="com.axelor.meta.db.MetaFile" title="LTA file" />
|
||||
|
||||
|
||||
<string name="shipping_tracking_number" title="Shipping tracking number" />
|
||||
|
||||
<!--enlevement souhaite -->
|
||||
<date name="requested_collection_date" title="Requested collection date" />
|
||||
<!--enlevement prevu -->
|
||||
<date name="agreed_collection_date" title="Agreed collection date" />
|
||||
|
||||
<!-- COA -->
|
||||
<many-to-one name="coaFile" ref="com.axelor.meta.db.MetaFile" title="coa file" />
|
||||
<string name="noteCOA" large="true" multiline="true" title="Comment on coa"/>
|
||||
|
||||
<datetime name="coa_validation_date" title="Coa validation date" />
|
||||
|
||||
<many-to-one name="coa_validator_user" ref="com.axelor.auth.db.User" />
|
||||
|
||||
<string name="tracking_website" selection="purchase.importation.folder.website.selection" title="Tracking website" />
|
||||
|
||||
<string name="file_type" selection="purchase.importation.folder.file.type" title="File type" />
|
||||
|
||||
<many-to-many name="importationDocumentExtraList" ref="ImportationDocumentExtra" title="Information document extra" />
|
||||
|
||||
<decimal name="CFR" title="CFR" />
|
||||
|
||||
<decimal name="freight" title="Freight" />
|
||||
|
||||
<decimal name="currencyRate" title="Currency Rate" scale="6" precision="20" />
|
||||
|
||||
<boolean name="invoicedFolder" title="Invoiced folder" />
|
||||
|
||||
<boolean name="rejected" default="false" title="Rejected" />
|
||||
<date name="rejectedDate" title="Rejected Date" />
|
||||
<many-to-one name="rejectedByUser" ref="com.axelor.auth.db.User" readonly="true" title="Rejected by"/>
|
||||
<integer name="rejectedInstanceSelect" title="Status" selection="purchase.importation.folder.status.select" />
|
||||
<string name="rejectionRaison" large="true"/>
|
||||
<many-to-one name="printingSettings" ref="com.axelor.apps.base.db.PrintingSettings"/>
|
||||
<!-- <many-to-one name="invoiceTemplate" ref="com.axelor.apps.account.db.InvoiceTemplate"/> -->
|
||||
|
||||
<decimal name="demurrage" title="Demurrage " scale="6" precision="20" />
|
||||
<decimal name="storageCost" title="Storage cost " scale="6" precision="20" />
|
||||
<decimal name="cx" title="CX " scale="6" precision="20" />
|
||||
|
||||
<extra-code>
|
||||
<![CDATA[
|
||||
/** Static importation folder status select */
|
||||
public static final int STATUS_DRAFT = 1;
|
||||
public static final int STATUS_OPEND = 2;
|
||||
public static final int STATUS_CLOSED = 3;
|
||||
public static final int STATUS_CANCELED = 4;
|
||||
public static final int STATUS_REJECTED = 9;
|
||||
public static final int STATUS_VALIDATED = 10;
|
||||
]]>
|
||||
</extra-code>
|
||||
|
||||
|
||||
<!-- end sophal -->
|
||||
<track>
|
||||
<field name="name"/>
|
||||
<field name="statusSelect"/>
|
||||
</track>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="account" package="com.axelor.apps.account.db"/>
|
||||
|
||||
<entity name="Invoice" lang="java">
|
||||
<many-to-one name="importationFolder" ref="com.axelor.apps.purchase.db.ImportationFolder" title="Importation folder"/>
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="base" package="com.axelor.apps.base.db"/>
|
||||
|
||||
<entity name="Partner" lang="java">
|
||||
<string name="purchaseOrderInformation" multiline="true" large="true"/>
|
||||
<one-to-many name="supplierCatalogList" ref="com.axelor.apps.purchase.db.SupplierCatalog" mappedBy="supplierPartner" title="Supplier Catalog Lines" />
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="base" package="com.axelor.apps.base.db"/>
|
||||
|
||||
<entity name="Product" lang="java">
|
||||
|
||||
<many-to-one name="purchasesUnit" ref="com.axelor.apps.base.db.Unit" title="Purchases unit" initParam="true" massUpdate="true" />
|
||||
<one-to-many name="supplierCatalogList" ref="com.axelor.apps.purchase.db.SupplierCatalog" mappedBy="product" title="Supplier Catalog Lines" />
|
||||
|
||||
<track on="UPDATE">
|
||||
<field name="purchasesUnit" />
|
||||
</track>
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity name="PurchaseConfig" lang="java" cacheable="true">
|
||||
|
||||
<one-to-one name="company" ref="com.axelor.apps.base.db.Company" title="Company" required="true" unique="true"/>
|
||||
|
||||
<integer name="purchaseOrderInAtiSelect" title="Purchase orders ATI/WT" selection="base.in.ati.select" default="1"/>
|
||||
<string name="purchaseOrderSupplierBox" large="true" multiline="true" title="Supplier box in purchase order"/>
|
||||
<boolean name="displayPriceOnQuotationRequest" title="Display price on requested purchase printing" />
|
||||
<boolean name="displayBuyerOnPrinting" title="Display buyer on printing"/>
|
||||
<boolean name="displayProductCodeOnPrinting" title="Display product code on printing"/>
|
||||
<boolean name="displayTaxDetailOnPrinting" title="Display tax detail on printing"/>
|
||||
<boolean name="displaySupplierCodeOnPrinting" title="Display supplier code on printing"/>
|
||||
<boolean name="displayProductDetailOnPrinting" title="Display product detail on printing"/>
|
||||
|
||||
<string name="priceRequest" title="Message for requesting prices" large="true"/>
|
||||
<boolean name="isAnalyticDistributionRequired" title="Analytic distribution required on purchase order line"/>
|
||||
<track>
|
||||
<field name="company" on="UPDATE"/>
|
||||
<field name="purchaseOrderInAtiSelect" on="UPDATE"/>
|
||||
<field name="purchaseOrderSupplierBox" on="UPDATE"/>
|
||||
<field name="displayBuyerOnPrinting" on="UPDATE"/>
|
||||
<field name="displayProductCodeOnPrinting" on="UPDATE"/>
|
||||
<field name="displayTaxDetailOnPrinting" on="UPDATE"/>
|
||||
<field name="displaySupplierCodeOnPrinting" on="UPDATE"/>
|
||||
<field name="displayProductDetailOnPrinting" on="UPDATE"/>
|
||||
<field name="priceRequest" on="UPDATE"/>
|
||||
<field name="isAnalyticDistributionRequired" on="UPDATE"/>
|
||||
</track>
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity name="PurchaseOrder" lang="java">
|
||||
|
||||
<string name="fullName" namecolumn="true">
|
||||
<![CDATA[
|
||||
if(purchaseOrderSeq==null){
|
||||
return " ";
|
||||
}
|
||||
return purchaseOrderSeq + "-" + supplierPartner.getName();
|
||||
]]>
|
||||
</string>
|
||||
<string name="purchaseOrderSeq" title="Ref." readonly="true"/>
|
||||
<many-to-one name="company" ref="com.axelor.apps.base.db.Company" required="true" title="Company"/>
|
||||
|
||||
<many-to-one name="supplierPartner" ref="com.axelor.apps.base.db.Partner" required="true" title="Supplier"/>
|
||||
<many-to-one name="contactPartner" ref="com.axelor.apps.base.db.Partner" title="Contact"/>
|
||||
<many-to-one name="priceList" ref="com.axelor.apps.base.db.PriceList" title="Price list"/>
|
||||
|
||||
<many-to-one name="payerPartner" ref="com.axelor.apps.base.db.Partner" title="Payer Supplier"/>
|
||||
<many-to-one name="deliveryPartner" ref="com.axelor.apps.base.db.Partner" title="Delivery Supplier"/>
|
||||
|
||||
<many-to-one name="team" ref="com.axelor.team.db.Team" title="Team" />
|
||||
<many-to-one name="buyerUser" ref="com.axelor.auth.db.User" title="Buyer"/>
|
||||
<many-to-one name="currency" ref="com.axelor.apps.base.db.Currency" title="Currency" required="true"/>
|
||||
<date name="deliveryDate" title="Estimated delivery Date"/>
|
||||
<date name="orderDate" title="Order Date"/>
|
||||
<one-to-many name="purchaseOrderLineList" mappedBy="purchaseOrder" ref="com.axelor.apps.purchase.db.PurchaseOrderLine" title="Products list"/>
|
||||
<integer name="statusSelect" title="Status" selection="purchase.purchase.order.status.select" readonly="true"/>
|
||||
<string name="externalReference" title="Supplier ref."/>
|
||||
<string name="internalReference" title="Internal Ref."/>
|
||||
<integer name="receiptState" title="Receipt State" selection="purchase.order.receipt.state" readonly="true" default="1"/>
|
||||
|
||||
<integer name="orderByState"/>
|
||||
|
||||
|
||||
<!-- Ligne de TVA -->
|
||||
<one-to-many name="purchaseOrderLineTaxList" ref="com.axelor.apps.purchase.db.PurchaseOrderLineTax" mappedBy="purchaseOrder" title="Tax Lines"/>
|
||||
|
||||
<!-- Validation and totals -->
|
||||
<many-to-one name="validatedByUser" ref="com.axelor.auth.db.User" readonly="true" title="Validated by"/>
|
||||
<date name="validationDate" title="Validation date" readonly="true"/>
|
||||
<decimal name="exTaxTotal" title="Total W.T." scale="2" precision="20" readonly="true"/>
|
||||
<decimal name="taxTotal" title="Total Tax" scale="2" precision="20" readonly="true"/>
|
||||
<decimal name="inTaxTotal" title="Total A.T.I." scale="2" precision="20" readonly="true"/>
|
||||
<decimal name="amountToBeSpreadOverTheTimetable" title="Amount to be spread over the timetable" scale="2" precision="20" readonly="true"/>
|
||||
|
||||
<decimal name="companyExTaxTotal" title="Total W.T." scale="2" precision="20" readonly="true"/>
|
||||
|
||||
<!-- Notes -->
|
||||
<string name="notes" large="true" multiline="true" title="Description To Display"/>
|
||||
<string name="internalNote" large="true" multiline="true" title="Internal Note"/>
|
||||
|
||||
<integer name="versionNumber" title="Version Number" readonly="true" default="1"/>
|
||||
|
||||
<boolean name="inAti" title="In ATI"/>
|
||||
|
||||
<many-to-one name="companyBankDetails" ref="com.axelor.apps.base.db.BankDetails" title="Company bank"/>
|
||||
|
||||
<boolean name="displayPriceOnQuotationRequest" title="Display price on requested purchase printing"/>
|
||||
|
||||
<string name="priceRequest" title="Message for requesting prices" large="true"/>
|
||||
|
||||
<many-to-one name="tradingName" ref="com.axelor.apps.base.db.TradingName"/>
|
||||
<many-to-one name="printingSettings" ref="com.axelor.apps.base.db.PrintingSettings"/>
|
||||
|
||||
<!-- importation folder -->
|
||||
<integer name="importationType" selection="importation.folder.type.select" title="Type d'importation" default="1" />
|
||||
<many-to-one name="importationFolder" ref="ImportationFolder" title="Dossier d'importation" />
|
||||
|
||||
<many-to-one name="purchaseRequestOrigin" ref="com.axelor.apps.purchase.db.PurchaseRequest" title="Purchase Request" />
|
||||
<many-to-one name="cancelReason" title="Cancel reason" ref="com.axelor.apps.base.db.CancelReason"/>
|
||||
<string name="cancelReasonStr" title="Cancel Reason" large="true"/>
|
||||
|
||||
<string name="finishReasonStr" title="Finish Reason" large="true"/>
|
||||
|
||||
<many-to-many name="purchaseRequestSet" ref="com.axelor.apps.purchase.db.PurchaseRequest" mappedBy="purchaseOrderSet" title="Purchase Request" />
|
||||
|
||||
<integer name="purchaseType" title="Purchase Type" selection="purchase.request.project.select"/>
|
||||
|
||||
<decimal name="stamp" title="stamp" scale="2" precision="20" />
|
||||
<decimal name="fixTax" title="fix Tax" scale="2" precision="20" />
|
||||
|
||||
<many-to-one name="requestedByUser" ref="com.axelor.auth.db.User" readonly="true" title="Requested by"/>
|
||||
<date name="requestDate" title="Request date" readonly="true"/>
|
||||
|
||||
<many-to-one name="approvedByUser" ref="com.axelor.auth.db.User" readonly="true" title="Approved by"/>
|
||||
<date name="approvalDate" title="Approval date" readonly="true"/>
|
||||
|
||||
<many-to-one name="standbyByUser" ref="com.axelor.auth.db.User" readonly="true" title="StandBy by"/>
|
||||
<date name="standbyDate" title="StandBy date" readonly="true"/>
|
||||
<string name="standbyRaison" title="Standby Raison" large="true"/>
|
||||
<boolean name="isStandBy" title="Is standby" default="0" />
|
||||
|
||||
<many-to-one name="barCodeSeq" title="Barcode" ref="com.axelor.meta.db.MetaFile" />
|
||||
|
||||
<boolean name="isWithoutPayment" title="Is Without Payment"/>
|
||||
|
||||
<unique-constraint columns="purchaseOrderSeq,company"/>
|
||||
|
||||
<extra-code>
|
||||
<![CDATA[
|
||||
/** Static purchase order status select */
|
||||
public static final int STATUS_STANDBY = -1;
|
||||
public static final int STATUS_DRAFT = 1;
|
||||
|
||||
public static final int STATUS_REQUESTED = 2;
|
||||
public static final int STATUS_VALIDATED = 3;
|
||||
public static final int STATUS_FINISHED = 4;
|
||||
public static final int STATUS_CANCELED = 5;
|
||||
|
||||
/** Static purchase order receipt status select */
|
||||
public static final int STATE_NOT_RECEIVED = 1;
|
||||
|
||||
public static final int STATE_PARTIALLY_RECEIVED = 2;
|
||||
public static final int STATE_RECEIVED = 3;
|
||||
|
||||
/** Static invoicing type select */
|
||||
public static final int INVOICING_FREE = 1;
|
||||
|
||||
public static final int INVOICING_BY_DELIVERY = 2;
|
||||
public static final int INVOICING_PER_ORDER = 3;
|
||||
]]>
|
||||
</extra-code>
|
||||
|
||||
<track>
|
||||
<field name="buyerUser" />
|
||||
<field name="cancelReason" />
|
||||
<field name="cancelReasonStr" />
|
||||
<field name="finishReasonStr" />
|
||||
<field name="purchaseOrderSeq" />
|
||||
<field name="supplierPartner" />
|
||||
<field name="statusSelect" on="UPDATE"/>
|
||||
<message if="true" on="CREATE">Purchase order created</message>
|
||||
<message if="statusSelect == 0" tag="important">Approved</message>
|
||||
<message if="statusSelect == 1" tag="important">Draft</message>
|
||||
<message if="statusSelect == 2" tag="important">Requested</message>
|
||||
<message if="statusSelect == 3" tag="info">Validated</message>
|
||||
<message if="statusSelect == 4" tag="success">Finished</message>
|
||||
<message if="statusSelect == 5" tag="warning">Canceled</message>
|
||||
</track>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity name="PurchaseOrderLine" lang="java">
|
||||
<string name="fullName" namecolumn="true">
|
||||
<![CDATA[
|
||||
String fullName = "";
|
||||
if(purchaseOrder != null && purchaseOrder.getPurchaseOrderSeq() != null){
|
||||
fullName += purchaseOrder.getPurchaseOrderSeq();
|
||||
}
|
||||
if(productName != null) {
|
||||
fullName += "-";
|
||||
if(productName.length() > 100) {
|
||||
fullName += productName.substring(1, 100);
|
||||
}
|
||||
else { fullName += productName; }
|
||||
}
|
||||
return fullName;
|
||||
]]>
|
||||
</string>
|
||||
<many-to-one name="purchaseOrder" ref="com.axelor.apps.purchase.db.PurchaseOrder" title="Purchase order"/>
|
||||
<integer name="sequence" title="Seq."/>
|
||||
<many-to-one name="product" ref="com.axelor.apps.base.db.Product" title="Product"/>
|
||||
<decimal name="qty" title="Qty" default="1"/>
|
||||
<string name="productName" title="Displayed Product name" required="true" translatable="true"/>
|
||||
<string name="productCode" title="Supplier code"/>
|
||||
<decimal name="price" title="Unit price W.T." precision="20" scale="10"/>
|
||||
<decimal name="inTaxPrice" title="Unit price A.T.I." precision="20" scale="10"/>
|
||||
<decimal name="priceDiscounted" title="Unit price discounted" precision="20" scale="10"/>
|
||||
<many-to-one name="taxLine" ref="com.axelor.apps.account.db.TaxLine" title="Tax"/>
|
||||
<decimal name="exTaxTotal" title="Total W.T."/>
|
||||
<decimal name="inTaxTotal" title="Total A.T.I."/>
|
||||
<many-to-one name="taxEquiv" ref="com.axelor.apps.account.db.TaxEquiv" title="Tax Equiv"/>
|
||||
|
||||
<string name="description" title="Description" large="true"/>
|
||||
<many-to-one name="unit" ref="com.axelor.apps.base.db.Unit" title="Unit"/>
|
||||
|
||||
<decimal name="discountAmount" title="Discount amount" precision="20" scale="10"/>
|
||||
<integer name="discountTypeSelect" title="Discount Type" selection="base.price.list.line.amount.type.select" default="0" />
|
||||
|
||||
<boolean name="isOrdered" title="Ordered"/>
|
||||
|
||||
<decimal name="saleMinPrice" title="Min sale price" precision="20" scale="10"/>
|
||||
|
||||
<date name="estimatedDelivDate" title="Estim. receipt date"/>
|
||||
<date name="desiredDelivDate" title="Desired receipt date"/>
|
||||
<decimal name="receivedQty" title="Received quantity"/>
|
||||
|
||||
<string name="supplierComment" title="Supplier Comment"/>
|
||||
<boolean name="fixedAssets" title="Fixed Assets"/>
|
||||
<!-- Champ technique non affiché, utilisé pour les reportings -->
|
||||
<decimal name="companyExTaxTotal" title="Total W.T. in company currency" hidden="true"/>
|
||||
<decimal name="companyInTaxTotal" title="Total A.T.I. in company currency" hidden="true"/>
|
||||
<!-- Highlight -->
|
||||
<decimal name="salePrice" precision="20" scale="10"/>
|
||||
|
||||
<boolean name="isTitleLine" title="Title Line"/>
|
||||
|
||||
<one-to-many name="purchaseOrderLineFileList" ref="PurchaseOrderLineFile" mappedBy="purchaseOrderLine" title="PurchaseOrderLine Files"/>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,205 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db" />
|
||||
|
||||
<entity name="PurchaseOrderLineFile" lang="java">
|
||||
<many-to-one name="coaFile" ref="com.axelor.meta.db.MetaFile" title="coa file" />
|
||||
<string
|
||||
name="noteCOA" large="true" multiline="true" title="Comment on coa" />
|
||||
<string name="file_type"
|
||||
selection="purchase.importation.folder.file.type" title="File type" />
|
||||
<datetime
|
||||
name="coa_validation_date" title="Coa validation date" />
|
||||
<many-to-one
|
||||
name="coa_validator_user" ref="com.axelor.auth.db.User" />
|
||||
|
||||
<integer name="statusSelect"
|
||||
title="Status" selection="purchase.order.line.file.status.select" default="1" readonly="true" />
|
||||
<integer
|
||||
name="rdStatusSelect" title="Status" selection="purchase.order.line.rd.file.status.select"
|
||||
default="1" readonly="true" />
|
||||
<integer name="qaStatusSelect" title="Status"
|
||||
selection="purchase.order.line.qa.file.status.select" default="1" readonly="true" />
|
||||
<integer
|
||||
name="qcStatusSelect" title="Status" selection="purchase.order.line.qc.file.status.select"
|
||||
default="1" readonly="true" />
|
||||
<integer name="productionStatusSelect" title="Status"
|
||||
selection="purchase.order.line.production.file.status.select" default="1" readonly="true" />
|
||||
<integer
|
||||
name="dtStatusSelect" title="Status" selection="purchase.order.line.file.dt.status.select"
|
||||
default="1" readonly="true" />
|
||||
|
||||
<many-to-one name="purchaseOrderLine"
|
||||
ref="com.axelor.apps.purchase.db.PurchaseOrderLine" title="Purchase order" />
|
||||
|
||||
<datetime
|
||||
name="rd_validation_date" title="RD validation date" />
|
||||
<many-to-one name="rd_user"
|
||||
ref="com.axelor.auth.db.User" />
|
||||
|
||||
<datetime name="qa_validation_date" title="QA validation date" />
|
||||
<many-to-one
|
||||
name="qa_validator_user" ref="com.axelor.auth.db.User" />
|
||||
|
||||
<datetime name="qc_validation_date"
|
||||
title="QC validation date" />
|
||||
<many-to-one name="qc_validator_user"
|
||||
ref="com.axelor.auth.db.User" />
|
||||
|
||||
<datetime name="production_validation_date"
|
||||
title="Production validation date" />
|
||||
<many-to-one name="production_validator_user"
|
||||
ref="com.axelor.auth.db.User" />
|
||||
|
||||
<datetime name="dt_validation_date" title="Dt validation date" />
|
||||
<many-to-one
|
||||
name="dt_validator_user" ref="com.axelor.auth.db.User" />
|
||||
|
||||
<datetime name="refusal_date"
|
||||
title="DSC refusal date" />
|
||||
<many-to-one name="refusal_user" ref="com.axelor.auth.db.User" />
|
||||
<string
|
||||
name="refusal_reason" title="Reasons of Refusal" large="true" />
|
||||
|
||||
|
||||
<datetime
|
||||
name="rd_refusal_date" title="RD refusal date" />
|
||||
<many-to-one name="rd_refusal_user"
|
||||
ref="com.axelor.auth.db.User" />
|
||||
<string name="rd_refusal_reason" title="Reasons of Refusal"
|
||||
large="true" />
|
||||
|
||||
|
||||
<datetime name="qa_refusal_date" title="QA refusal date" />
|
||||
<many-to-one
|
||||
name="qa_validator_refusal_user" ref="com.axelor.auth.db.User" />
|
||||
<string
|
||||
name="qa_refusal_reason" title="Reasons of Refusal" large="true" />
|
||||
|
||||
|
||||
<datetime
|
||||
name="qc_refusal_date" title="QC refusal date" />
|
||||
<many-to-one name="qc_validator_refusal_user"
|
||||
ref="com.axelor.auth.db.User" />
|
||||
<string name="qc_refusal_reason" title="Reasons of Refusal"
|
||||
large="true" />
|
||||
|
||||
|
||||
<datetime name="production_refusal_date" title="Production refusal date" />
|
||||
<many-to-one
|
||||
name="production_validator_refusal_user" ref="com.axelor.auth.db.User" />
|
||||
<string
|
||||
name="production_refusal_reason" title="Reasons of Refusal" large="true" />
|
||||
|
||||
<datetime
|
||||
name="dt_refusal_date" title="Dr refusal date" />
|
||||
<many-to-one
|
||||
name="dt_validator_refusal_user" ref="com.axelor.auth.db.User" />
|
||||
<string
|
||||
name="dt_refusal_reason" title="Reasons of Refusal" large="true" />
|
||||
|
||||
|
||||
<!-- General Status -->
|
||||
<datetime
|
||||
name="statusReviewDate" title="Status Review Date" />
|
||||
<many-to-one name="statusReviewedBy"
|
||||
ref="com.axelor.auth.db.User" title="Status Reviewed By" />
|
||||
|
||||
<!-- RD -->
|
||||
<datetime name="rdStatusReviewDate"
|
||||
title="RD Status Review Date" />
|
||||
<many-to-one name="rdStatusReviewedBy"
|
||||
ref="com.axelor.auth.db.User" title="RD Status Reviewed By" />
|
||||
|
||||
<!-- QA -->
|
||||
<datetime
|
||||
name="qaStatusReviewDate" title="QA Status Review Date" />
|
||||
<many-to-one
|
||||
name="qaStatusReviewedBy" ref="com.axelor.auth.db.User" title="QA Status Reviewed By" />
|
||||
|
||||
<!-- QC -->
|
||||
<datetime
|
||||
name="qcStatusReviewDate" title="QC Status Review Date" />
|
||||
<many-to-one
|
||||
name="qcStatusReviewedBy" ref="com.axelor.auth.db.User" title="QC Status Reviewed By" />
|
||||
|
||||
<!-- Production -->
|
||||
<datetime
|
||||
name="productionStatusReviewDate" title="Production Status Review Date" />
|
||||
<many-to-one
|
||||
name="productionStatusReviewedBy" ref="com.axelor.auth.db.User"
|
||||
title="Production Status Reviewed By" />
|
||||
|
||||
<!-- DT -->
|
||||
<datetime name="dtStatusReviewDate"
|
||||
title="DT Status Review Date" />
|
||||
<many-to-one name="dtStatusReviewedBy"
|
||||
ref="com.axelor.auth.db.User" title="DT Status Reviewed By" />
|
||||
|
||||
<boolean name="routinePurchase"
|
||||
title="Routine purchase" default="false" />
|
||||
|
||||
<extra-code>
|
||||
<![CDATA[
|
||||
// General Status Constants
|
||||
public static final String STATUS_SELECT = "STATUS_SELECT";
|
||||
|
||||
// RD Status Select Constant
|
||||
public static final String RD_STATUS_SELECT = "RD_STATUS_SELECT";
|
||||
|
||||
// QA Status Select Constant
|
||||
public static final String QA_STATUS_SELECT = "QA_STATUS_SELECT";
|
||||
|
||||
// QC Status Select Constant
|
||||
public static final String QC_STATUS_SELECT = "QC_STATUS_SELECT";
|
||||
|
||||
// Production Status Select Constant
|
||||
public static final String PRODUCTION_STATUS_SELECT = "PRODUCTION_STATUS_SELECT";
|
||||
|
||||
// DT Status Select Constant
|
||||
public static final String DT_STATUS_SELECT = "DT_STATUS_SELECT";
|
||||
]]>
|
||||
</extra-code>
|
||||
|
||||
|
||||
<track>
|
||||
<!-- Status Fields -->
|
||||
<field name="statusSelect" />
|
||||
<field name="rdStatusSelect" />
|
||||
<field name="qaStatusSelect" />
|
||||
<field name="qcStatusSelect" />
|
||||
<field name="productionStatusSelect" />
|
||||
<field name="dtStatusSelect" />
|
||||
|
||||
<!-- Refusal Date Fields -->
|
||||
<field name="refusal_date" />
|
||||
<field name="rd_refusal_date" />
|
||||
<field name="qa_refusal_date" />
|
||||
<field name="qc_refusal_date" />
|
||||
<field name="production_refusal_date" />
|
||||
<field name="dt_refusal_date" />
|
||||
|
||||
<!-- Validation Date Fields -->
|
||||
<field name="coa_validation_date" />
|
||||
<field name="rd_validation_date" />
|
||||
<field name="qa_validation_date" />
|
||||
<field name="qc_validation_date" />
|
||||
<field name="production_validation_date" />
|
||||
<field name="dt_validation_date" />
|
||||
|
||||
<!-- Review Date Fields -->
|
||||
<field name="statusReviewDate" />
|
||||
<field name="rdStatusReviewDate" />
|
||||
<field name="qaStatusReviewDate" />
|
||||
<field name="qcStatusReviewDate" />
|
||||
<field name="productionStatusReviewDate" />
|
||||
<field name="dtStatusReviewDate" />
|
||||
</track>
|
||||
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity sequential="true" name="PurchaseOrderLineTax" lang="java">
|
||||
|
||||
<many-to-one name="purchaseOrder" ref="PurchaseOrder" title="Purchase order"/>
|
||||
<many-to-one name="taxLine" ref="com.axelor.apps.account.db.TaxLine" title="Tax"/>
|
||||
<decimal name="exTaxBase" scale="2" precision="20" title="Base W.T."/>
|
||||
<decimal name="taxTotal" scale="2" precision="20" title="Amount Tax"/>
|
||||
<decimal name="inTaxTotal" scale="2" precision="20" title="Amount A.T.I."/>
|
||||
<boolean name="reverseCharged"/>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity name="PurchaseRequest" lang="java" cacheable="true">
|
||||
|
||||
<many-to-one name="company" ref="com.axelor.apps.base.db.Company" title="Company"/>
|
||||
<many-to-one name="supplierUser" ref="com.axelor.apps.base.db.Partner" title="Supplier" />
|
||||
<string name="description" title="Description" large="true"/>
|
||||
<many-to-one name="purchaseOrder" ref="com.axelor.apps.purchase.db.PurchaseOrder" title="Purchase order" />
|
||||
<integer name="statusSelect" title="Status" selection="purchase.request.status.select" default="1"/>
|
||||
<many-to-many name="purchaseOrderSet" ref="com.axelor.apps.purchase.db.PurchaseOrder" title="Purchase orders"/>
|
||||
<string name="purchaseRequestSeq" title="Ref." namecolumn="true" />
|
||||
<one-to-many ref="com.axelor.apps.purchase.db.PurchaseRequestLine" name="purchaseRequestLineList" title="Purchase Request Lines" mappedBy="purchaseRequest"/>
|
||||
<many-to-one name="familleProduit" ref="com.axelor.apps.base.db.FamilleProduit" title="famille article" />
|
||||
|
||||
<many-to-one name="acceptedByUser" ref="com.axelor.auth.db.User" readonly="true" title="Accepted by"/>
|
||||
<date name="acceptanceDate" title="Acceptance date" readonly="true"/>
|
||||
|
||||
<many-to-one name="validatedByUser" ref="com.axelor.auth.db.User" readonly="true" title="Validated by"/>
|
||||
<date name="validationDate" title="Validation date" readonly="true"/>
|
||||
|
||||
<many-to-one name="approvedByUser" ref="com.axelor.auth.db.User" readonly="true" title="Approved by"/>
|
||||
<date name="approvalDate" title="approval date" readonly="true"/>
|
||||
|
||||
<date name="requestDate" title="request Date" />
|
||||
<date name="requestedDelay" title="requested Delay"/>
|
||||
|
||||
<many-to-one name="assignedToUser" title="Buyer" ref="com.axelor.auth.db.User"/>
|
||||
|
||||
<many-to-one name="printingSettings" ref="com.axelor.apps.base.db.PrintingSettings"/>
|
||||
|
||||
<integer name="purchaseType" title="Purchase Type" selection="purchase.request.project.select"/>
|
||||
|
||||
<integer name="orderByState"/>
|
||||
|
||||
<many-to-many name="buyers" ref="com.axelor.auth.db.User" title="Buyers" />
|
||||
|
||||
<boolean name="canDuplicatePo" title="Can duplicate PO" default="false"/>
|
||||
|
||||
<integer name="limitPo" title="limit Po" default="1"/>
|
||||
|
||||
<unique-constraint columns="purchaseRequestSeq"/>
|
||||
|
||||
<extra-code>
|
||||
<![CDATA[
|
||||
// STATUS
|
||||
public static final int STATUS_DRAFT = 1;
|
||||
public static final int STATUS_REQUESTED = 2;
|
||||
public static final int STATUS_ACCEPTED = 3;
|
||||
public static final int STATUS_PURCHASED = 4;
|
||||
public static final int STATUS_PARTIAL_DELIVERY = 5;
|
||||
public static final int STATUS_RECEIVED = 6;
|
||||
public static final int STATUS_REFUSED = 7;
|
||||
public static final int STATUS_CANCELED = 8;
|
||||
]]>
|
||||
</extra-code>
|
||||
|
||||
<track>
|
||||
<field name="statusSelect"/>
|
||||
<field name="supplierUser"/>
|
||||
<field name="purchaseRequestSeq" />
|
||||
</track>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity name="PurchaseRequestCreator" lang="java" cacheable="true">
|
||||
|
||||
<string name="name" title="Name" required="true" />
|
||||
<one-to-many name="attributes" title="Attributes" ref="com.axelor.meta.db.MetaJsonField" orphanRemoval="true" />
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.0.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity name="PurchaseRequestLine" lang="java" cacheable="true">
|
||||
<many-to-one name="product" ref="com.axelor.apps.base.db.Product" title="Product"/>
|
||||
<boolean name="newProduct" title="New product" />
|
||||
<many-to-one name="unit" ref="com.axelor.apps.base.db.Unit" title="Unit" />
|
||||
<decimal name="quantity" title="Quantity"/>
|
||||
<string name="productTitle" title="Product"/>
|
||||
<many-to-one name="purchaseRequest" ref="com.axelor.apps.purchase.db.PurchaseRequest" title="Purchase request"/>
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="base" package="com.axelor.apps.base.db"/>
|
||||
|
||||
<entity name="Sequence" lang="java">
|
||||
|
||||
<extra-code><![CDATA[
|
||||
|
||||
//SEQUENCE SELECT
|
||||
public static final String PURCHASE_ORDER = "purchaseOrder";
|
||||
public static final String PURCHASE_REQUEST = "PurchaseRequest";
|
||||
|
||||
]]></extra-code>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="base" package="com.axelor.apps.base.db"/>
|
||||
|
||||
<entity name="ShippingCoef" lang="java">
|
||||
<many-to-one name="supplierCatalog" ref="com.axelor.apps.purchase.db.SupplierCatalog"/>
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity name="SupplierCatalog" lang="java">
|
||||
|
||||
<many-to-one name="product" ref="com.axelor.apps.base.db.Product" title="Product" required="true"/>
|
||||
<many-to-one name="supplierPartner" ref="com.axelor.apps.base.db.Partner" required="true" title="Supplier"/>
|
||||
<string name="productSupplierName" title="Product name on catalog"/>
|
||||
<string name="productSupplierCode" title="Product code on catalog"/>
|
||||
<decimal name="price" title="Unit price" precision="20" scale="10"/>
|
||||
<date name="updateDate" title="Last update"/>
|
||||
<string name="description" title="Description" large="true"/>
|
||||
<decimal name="calculatedPrice" title="Calculated price/Qty"/>
|
||||
<one-to-many name="shippingCoefList" mappedBy="supplierCatalog"
|
||||
title="Shipping Coefficients"
|
||||
ref="com.axelor.apps.base.db.ShippingCoef"/>
|
||||
<decimal name="minQty" title="Quantity min"/>
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">
|
||||
|
||||
<module name="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity name="ImportationComment">
|
||||
<string name="comments" large="true" multiline="true" title="Note"/>
|
||||
<integer name="step" title="Step" selection="purchase.importation.folder.status.select" />
|
||||
<many-to-one name="importationFolder" ref="com.axelor.apps.purchase.db.ImportationFolder" title="importation folder"/>
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,346 @@
|
||||
"key","message","comment","context"
|
||||
"50 Latest Supplier Orders",,,
|
||||
"A tax line is missing",,,
|
||||
"ABC analysis",,,
|
||||
"ATI",,,
|
||||
"AbcAnalysis.endDate",,,
|
||||
"AbcAnalysis.startDate",,,
|
||||
"Accept",,,
|
||||
"Accept and generate PO",,,
|
||||
"Accepted",,,
|
||||
"Actions",,,
|
||||
"Add",,,
|
||||
"All requests accepted",,,
|
||||
"All requests sent",,,
|
||||
"Amount",,,
|
||||
"Amount A.T.I.",,,
|
||||
"Amount Tax",,,
|
||||
"Amount invoiced W.T.",,,
|
||||
"Amount to be spread over the timetable",,,
|
||||
"Analytic distribution",,,
|
||||
"Analytic distribution required on purchase order line",,,
|
||||
"Analytics",,,
|
||||
"App purchase",,,
|
||||
"Apply to all",,,
|
||||
"Attributes",,,
|
||||
"Base W.T.",,,
|
||||
"Budget",,,
|
||||
"Budget distribution",,,
|
||||
"Business Project",,,
|
||||
"Business project",,,
|
||||
"Buyer",,,
|
||||
"Calculated price/Qty",,,
|
||||
"Cancel",,,
|
||||
"Cancel receipt",,,
|
||||
"Canceled",,,
|
||||
"Characteristics",,,
|
||||
"Closed Purchase orders",,,
|
||||
"Code",,,
|
||||
"Company",,,
|
||||
"Company bank",,,
|
||||
"Configuration",,,
|
||||
"Confirm",,,
|
||||
"Confirm my cart",,,
|
||||
"Confirmation",,,
|
||||
"Contact",,,
|
||||
"Contact partner",,,
|
||||
"Contacts",,,
|
||||
"Content",,,
|
||||
"Currency",,,
|
||||
"Current Purchase orders",,,
|
||||
"Custom field",,,
|
||||
"Custom fields",,,
|
||||
"Dashboard",,,
|
||||
"Dates",,,
|
||||
"Deliver",,,
|
||||
"Deliver Partially",,,
|
||||
"Delivery",,,
|
||||
"Description",,,
|
||||
"Description To Display",,,
|
||||
"Desired receipt date",,,
|
||||
"Discount Type",,,
|
||||
"Discount amount",,,
|
||||
"Discount rate",,,
|
||||
"Display buyer on printing",,,
|
||||
"Display price on requested purchase printing",,,
|
||||
"Display product code on printing",,,
|
||||
"Display product detail on printing",,,
|
||||
"Display purchase order line number",,,
|
||||
"Display supplier code on printing",,,
|
||||
"Display tax detail on printing",,,
|
||||
"Displayed Product name",,,
|
||||
"Draft",,,
|
||||
"Enable product description copy",,,
|
||||
"End date",,,
|
||||
"Estim. receipt date",,,
|
||||
"Estimated delivery Date",,,
|
||||
"Filter on supplier",,,
|
||||
"Finish the order",,,
|
||||
"Finished",,,
|
||||
"Fixed Assets",,,
|
||||
"Follow-up",,,
|
||||
"From Date",,,
|
||||
"Full name",,,
|
||||
"Generate PO",,,
|
||||
"Generate control invoice",,,
|
||||
"Generate purchase configurations",,,
|
||||
"Generate supplier arrival",,,
|
||||
"Generate suppliers requests",,,
|
||||
"Group by product",,,
|
||||
"Group by supplier",,,
|
||||
"Historical",,,
|
||||
"Historical Period",,,
|
||||
"In ATI",,,
|
||||
"In Stock Moves",,,
|
||||
"Information",,,
|
||||
"Internal Note",,,
|
||||
"Internal Ref.",,,
|
||||
"Internal note",,,
|
||||
"Internal purchase requests",,,
|
||||
"Invoice Lines",,,
|
||||
"Invoiced",,,
|
||||
"Invoices",,,
|
||||
"Invoicing",,,
|
||||
"Last update",,,
|
||||
"Manage multiple purchase quantity",,,
|
||||
"Manage purchase order versions",,,
|
||||
"Manage purchases unit on products",,,
|
||||
"Manage supplier catalog",,,
|
||||
"Merge into single purchase order",,,
|
||||
"Merge purchase orders",,,
|
||||
"Merge quotations",,,
|
||||
"Message for requesting prices",,,
|
||||
"Min sale price",,,
|
||||
"Month",,,
|
||||
"My Closed Purchase orders",,,
|
||||
"My Ongoing Purchase orders",,,
|
||||
"My Orders to process",,,
|
||||
"My Purchase orders",,,
|
||||
"My Purchase request",,,
|
||||
"My RFQs",,,
|
||||
"My RFQs and POs To Validate (Requested & Received)",,,
|
||||
"My Sales",,,
|
||||
"My Validated POs",,,
|
||||
"My purchased amount by product accounting family",,,
|
||||
"My purchased qty by product accounting family",,,
|
||||
"Name",,,
|
||||
"Nbr of PO by month",,,
|
||||
"New product",,,
|
||||
"New version",,,
|
||||
"Not invoiced",,,
|
||||
"Not received",,,
|
||||
"OR",,,
|
||||
"Ongoing Purchase orders",,,
|
||||
"Order Date",,,
|
||||
"Ordered",,,
|
||||
"Overview",,,
|
||||
"PO Management",,,
|
||||
"PO Tax line",,,
|
||||
"PO Tax lines",,,
|
||||
"PO line",,,
|
||||
"PO lines",,,
|
||||
"PO lines detail",,,
|
||||
"POs Volume by buyer by accounting family",,,
|
||||
"Partial delivery",,,
|
||||
"Partially invoiced",,,
|
||||
"Partially received",,,
|
||||
"Partner price lists",,,
|
||||
"Percent",,,
|
||||
"Please enter at least one detail line.",,,
|
||||
"Please enter supplier for following purchase request : %s",,,
|
||||
"Please fill printing settings on following purchase orders: %s",,,
|
||||
"Please fill printing settings on purchase order %s",,,
|
||||
"Please select the purchase order(s) to print.",,,
|
||||
"Price List",,,
|
||||
"Price list",,,
|
||||
"Price lists",,,
|
||||
"Print",,,
|
||||
"Printing",,,
|
||||
"Printing settings",,,
|
||||
"Product",,,
|
||||
"Product Accounting Family",,,
|
||||
"Product code on catalog",,,
|
||||
"Product name on catalog",,,
|
||||
"Products & services",,,
|
||||
"Products list",,,
|
||||
"Purchase",,,
|
||||
"Purchase Buyer",,,
|
||||
"Purchase Manager",,,
|
||||
"Purchase Request Line",,,
|
||||
"Purchase Request Lines",,,
|
||||
"Purchase blocking",,,
|
||||
"Purchase config",,,
|
||||
"Purchase config (${ name })",,,
|
||||
"Purchase configuration",,,
|
||||
"Purchase configurations",,,
|
||||
"Purchase order",,,
|
||||
"Purchase order created",,,
|
||||
"Purchase order information",,,
|
||||
"Purchase orders",,,
|
||||
"Purchase orders ATI/WT",,,
|
||||
"Purchase orders Details",,,
|
||||
"Purchase orders to merge",,,
|
||||
"Purchase quotations",,,
|
||||
"Purchase request",,,
|
||||
"Purchase request creator",,,
|
||||
"PurchaseOrder.afterDiscount",,,
|
||||
"PurchaseOrder.base",,,
|
||||
"PurchaseOrder.buyer",,,
|
||||
"PurchaseOrder.buyerEmail",,,
|
||||
"PurchaseOrder.buyerPhone",,,
|
||||
"PurchaseOrder.canceled",,,
|
||||
"PurchaseOrder.customer",,,
|
||||
"PurchaseOrder.customerRef",,,
|
||||
"PurchaseOrder.deliveryAddress",,,
|
||||
"PurchaseOrder.deliveryDate",,,
|
||||
"PurchaseOrder.description",,,
|
||||
"PurchaseOrder.desiredDelivDate",,,
|
||||
"PurchaseOrder.discountAmount",,,
|
||||
"PurchaseOrder.draft",,,
|
||||
"PurchaseOrder.finished",,,
|
||||
"PurchaseOrder.invoicingAddress",,,
|
||||
"PurchaseOrder.note",,,
|
||||
"PurchaseOrder.order",,,
|
||||
"PurchaseOrder.orderDate",,,
|
||||
"PurchaseOrder.paymentCondition",,,
|
||||
"PurchaseOrder.paymentMode",,,
|
||||
"PurchaseOrder.priceExclTax",,,
|
||||
"PurchaseOrder.priceInclTax",,,
|
||||
"PurchaseOrder.productSequence",,,
|
||||
"PurchaseOrder.productStandard",,,
|
||||
"PurchaseOrder.purchaseInfo",,,
|
||||
"PurchaseOrder.qtyUnit",,,
|
||||
"PurchaseOrder.quote",,,
|
||||
"PurchaseOrder.ref",,,
|
||||
"PurchaseOrder.reference",,,
|
||||
"PurchaseOrder.requested",,,
|
||||
"PurchaseOrder.state",,,
|
||||
"PurchaseOrder.statusCanceled",,,
|
||||
"PurchaseOrder.statusDraft",,,
|
||||
"PurchaseOrder.statusFinished",,,
|
||||
"PurchaseOrder.statusRequested",,,
|
||||
"PurchaseOrder.statusValidated",,,
|
||||
"PurchaseOrder.supplier",,,
|
||||
"PurchaseOrder.supplierCode",,,
|
||||
"PurchaseOrder.supplyRef",,,
|
||||
"PurchaseOrder.tax",,,
|
||||
"PurchaseOrder.taxAmount",,,
|
||||
"PurchaseOrder.totalDiscount",,,
|
||||
"PurchaseOrder.totalExclTax",,,
|
||||
"PurchaseOrder.totalExclTaxWithoutDiscount",,,
|
||||
"PurchaseOrder.totalInclTax",,,
|
||||
"PurchaseOrder.totalTax",,,
|
||||
"PurchaseOrder.unitPrice",,,
|
||||
"PurchaseOrder.validated",,,
|
||||
"Purchased",,,
|
||||
"Purchased amount by accounting family",,,
|
||||
"Purchased amount by product accounting family",,,
|
||||
"Purchased amount distribution by accounting family",,,
|
||||
"Purchases",,,
|
||||
"Purchases Order filters",,,
|
||||
"Purchases follow-up",,,
|
||||
"Purchases unit",,,
|
||||
"Qty",,,
|
||||
"Quantity",,,
|
||||
"Quantity min",,,
|
||||
"Quotation",,,
|
||||
"RFQ And PO To Validate",,,
|
||||
"Receipt State",,,
|
||||
"Received",,,
|
||||
"Received quantity",,,
|
||||
"Ref.",,,
|
||||
"Reference already existing",,,
|
||||
"References",,,
|
||||
"Refuse",,,
|
||||
"Refused",,,
|
||||
"Reportings",,,
|
||||
"Reports",,,
|
||||
"Request",,,
|
||||
"Requested",,,
|
||||
"Reverse charged",,,
|
||||
"Sale orders",,,
|
||||
"Sale price",,,
|
||||
"Sale quotations",,,
|
||||
"See budget distribution lines",,,
|
||||
"See purchase order lines",,,
|
||||
"See purchase orders lines",,,
|
||||
"See quotation lines",,,
|
||||
"Send Email",,,
|
||||
"Send email",,,
|
||||
"Seq.",,,
|
||||
"Shipping Coefficients",,,
|
||||
"Show invoice",,,
|
||||
"Start date",,,
|
||||
"Status",,,
|
||||
"Stock location",,,
|
||||
"Stock move",,,
|
||||
"Supplier",,,
|
||||
"Supplier Catalog",,,
|
||||
"Supplier Catalog Lines",,,
|
||||
"Supplier Comment",,,
|
||||
"Supplier RFQ/PO",,,
|
||||
"Supplier RFQs/POs",,,
|
||||
"Supplier box in purchase order",,,
|
||||
"Supplier catalog",,,
|
||||
"Supplier code",,,
|
||||
"Supplier invoices",,,
|
||||
"Supplier is required to generate a purchase order.",,,
|
||||
"Supplier ref.",,,
|
||||
"Suppliers",,,
|
||||
"Suppliers Map",,,
|
||||
"Suppliers requests",,,
|
||||
"Tax",,,
|
||||
"Tax Equiv",,,
|
||||
"Tax Lines",,,
|
||||
"Team",,,
|
||||
"The company %s doesn't have any configured sequence for the purchase orders",,,
|
||||
"The company is required and must be the same for all purchase orders",,,
|
||||
"The currency is required and must be the same for all purchase orders",,,
|
||||
"The field 'Stock Location' must be filled.",,,
|
||||
"The line cannot be null.",,,
|
||||
"The minimum order quantity of %s to the supplier is not respected.",,,
|
||||
"The supplier Partner is required and must be the same for all purchase orders",,,
|
||||
"The trading name must be the same for all purchase orders",,,
|
||||
"There is no sequence set for the purchase requests for the company %s",,,
|
||||
"This product is not available from the supplier.",,,
|
||||
"This supplier is blocked:",,,
|
||||
"Timetable",,,
|
||||
"Title",,,
|
||||
"Title Line",,,
|
||||
"To Date",,,
|
||||
"Tools",,,
|
||||
"Total A.T.I.",,,
|
||||
"Total A.T.I. in company currency",,,
|
||||
"Total Purchased Amount by month",,,
|
||||
"Total Purchased Qty by month",,,
|
||||
"Total Tax",,,
|
||||
"Total W.T.",,,
|
||||
"Total W.T. in company currency",,,
|
||||
"Total tax",,,
|
||||
"Trading name",,,
|
||||
"Turn Over",,,
|
||||
"Unit",,,
|
||||
"Unit price",,,
|
||||
"Unit price A.T.I.",,,
|
||||
"Unit price W.T.",,,
|
||||
"Unit price discounted",,,
|
||||
"Units",,,
|
||||
"Update lines with selected project",,,
|
||||
"Validate",,,
|
||||
"Validated",,,
|
||||
"Validated by",,,
|
||||
"Validation date",,,
|
||||
"Version Number",,,
|
||||
"WT",,,
|
||||
"Warning, a completed order can't be changed anymore, do you want to continue?",,,
|
||||
"You have to choose at least one purchase order",,,
|
||||
"You must configure Purchase module for the company %s",,,
|
||||
"You need a purchase order associated to line.",,,
|
||||
"important",,,
|
||||
"info",,,
|
||||
"success",,,
|
||||
"value:Purchase",,,
|
||||
"value:Purchase Request",,,
|
||||
"warning",,,
|
||||
"{{ company.name }}",,,
|
||||
"{{ stockLocation.name }}",,,
|
||||
|
@ -0,0 +1,344 @@
|
||||
"key","message","comment","context"
|
||||
"50 Latest Supplier Orders","50 Letzte Lieferantenbestellungen",,
|
||||
"A tax line is missing","Eine Steuerzeile fehlt",,
|
||||
"ABC analysis",,,
|
||||
"ATI","ATI",,
|
||||
"AbcAnalysis.endDate",,,
|
||||
"AbcAnalysis.startDate",,,
|
||||
"Accept","Akzeptieren",,
|
||||
"Accept and generate PO","Bestellung annehmen und generieren",,
|
||||
"Accepted","Akzeptiert",,
|
||||
"Actions","Aktionen",,
|
||||
"Add","Hinzufügen",,
|
||||
"All requests accepted","Alle Anfragen angenommen",,
|
||||
"All requests sent","Alle Anfragen gesendet",,
|
||||
"Amount","Betrag",,
|
||||
"Amount A.T.I.","Betrag A.T.I.",,
|
||||
"Amount Tax",,,
|
||||
"Amount invoiced W.T.","Rechnungsbetrag W.T.",,
|
||||
"Amount to be spread over the timetable","Betrag, der auf den Zeitplan zu verteilen ist.",,
|
||||
"Analytic distribution",,,
|
||||
"Analytic distribution required on purchase order line",,,
|
||||
"Analytics","Analytik",,
|
||||
"App purchase","App Kauf",,
|
||||
"Apply to all","Auf alle anwenden",,
|
||||
"Attributes","Attribute",,
|
||||
"Base W.T.","Basis W.T.",,
|
||||
"Budget","Budget",,
|
||||
"Budget distribution","Budgetverteilung",,
|
||||
"Business Project","Geschäftsprojekt",,
|
||||
"Business project","Geschäftsprojekt",,
|
||||
"Buyer","Käufer",,
|
||||
"Calculated price/Qty","Kalkulierter Preis/Menge",,
|
||||
"Cancel","Abbrechen",,
|
||||
"Cancel receipt","Beleg stornieren",,
|
||||
"Canceled","Abgesagt",,
|
||||
"Characteristics","Merkmale",,
|
||||
"Closed Purchase orders","Abgeschlossene Bestellungen",,
|
||||
"Code",,,
|
||||
"Company","Unternehmen",,
|
||||
"Company bank","Firmenbank",,
|
||||
"Configuration","Konfiguration",,
|
||||
"Confirm","Bestätigen",,
|
||||
"Confirm my cart","Meinen Warenkorb bestätigen",,
|
||||
"Confirmation","Bestätigung",,
|
||||
"Contact","Kontakt",,
|
||||
"Contact partner","Ansprechpartner",,
|
||||
"Contacts","Kontakte",,
|
||||
"Content","Inhalt",,
|
||||
"Currency","Währung",,
|
||||
"Current Purchase orders","Aktuelle Bestellungen",,
|
||||
"Custom field","Benutzerdefiniertes Feld",,
|
||||
"Custom fields","Benutzerdefinierte Felder",,
|
||||
"Dashboard","Dashboard",,
|
||||
"Dates","Daten",,
|
||||
"Deliver","Liefern",,
|
||||
"Deliver Partially","Teilweise liefern",,
|
||||
"Delivery","Lieferung",,
|
||||
"Description","Beschreibung",,
|
||||
"Description To Display","Beschreibung Zur Anzeige",,
|
||||
"Desired receipt date",,,
|
||||
"Discount Type","Rabattart",,
|
||||
"Discount amount","Rabattbetrag",,
|
||||
"Discount rate","Diskontierungssatz",,
|
||||
"Display buyer on printing","Käufer beim Drucken anzeigen",,
|
||||
"Display price on requested purchase printing","Anzeigen des Preises beim gewünschten Einkaufsdruck",,
|
||||
"Display product code on printing","Produktcode beim Drucken anzeigen",,
|
||||
"Display product detail on printing","Produktdetails beim Drucken anzeigen",,
|
||||
"Display purchase order line number",,,
|
||||
"Display supplier code on printing",,,
|
||||
"Display tax detail on printing","Steuerdetails beim Drucken anzeigen",,
|
||||
"Displayed Product name","Angezeigter Produktname",,
|
||||
"Draft","Entwurf",,
|
||||
"Enable product description copy","Kopie der Produktbeschreibung aktivieren",,
|
||||
"End date",,,
|
||||
"Estim. receipt date",,,
|
||||
"Estimated delivery Date","Geschätzter Liefertermin",,
|
||||
"Filter on supplier","Filter nach Lieferant",,
|
||||
"Finish the order","Beenden Sie die Bestellung",,
|
||||
"Finished","Fertiggestellt",,
|
||||
"Fixed Assets","Anlagevermögen",,
|
||||
"Follow-up","Nachbereitung",,
|
||||
"From Date","Von-Datum",,
|
||||
"Full name","Vollständiger Name",,
|
||||
"Generate PO","Bestellung generieren",,
|
||||
"Generate control invoice","Generieren Sie eine Kontrollrechnung",,
|
||||
"Generate purchase configurations","Generierung von Kaufkonfigurationen",,
|
||||
"Generate supplier arrival","Lieferantenankunft generieren",,
|
||||
"Generate suppliers requests","Lieferantenanfragen generieren",,
|
||||
"Group by product","Gruppieren nach Produkt",,
|
||||
"Group by supplier","Gruppierung nach Lieferanten",,
|
||||
"Historical","Historisch",,
|
||||
"Historical Period","Historischer Zeitraum",,
|
||||
"In ATI","In ATI",,
|
||||
"In Stock Moves","In Lagerbewegungen",,
|
||||
"Information","Informationen",,
|
||||
"Internal Note","Interner Hinweis",,
|
||||
"Internal Ref.","Interne Ref.",,
|
||||
"Internal note","Interner Hinweis",,
|
||||
"Internal purchase requests",,,
|
||||
"Invoice Lines","Rechnungszeilen",,
|
||||
"Invoiced","Rechnungsstellung",,
|
||||
"Invoices","Rechnungen",,
|
||||
"Invoicing","Rechnungsstellung",,
|
||||
"Last update","Letztes Update",,
|
||||
"Manage multiple purchase quantity","Verwaltung mehrerer Einkaufsmengen",,
|
||||
"Manage purchase order versions","Bestellversionen verwalten",,
|
||||
"Manage purchases unit on products","Verwaltung der Einkaufseinheit für Produkte",,
|
||||
"Manage supplier catalog","Lieferantenkatalog verwalten",,
|
||||
"Merge into single purchase order","Zusammenführung zur Einzelbestellung",,
|
||||
"Merge purchase orders","Bestellungen zusammenführen",,
|
||||
"Merge quotations","Angebote zusammenführen",,
|
||||
"Message for requesting prices","Nachricht für die Preisanfrage",,
|
||||
"Min sale price","Mindestverkaufspreis",,
|
||||
"Month","Monat",,
|
||||
"My Closed Purchase orders","Meine abgeschlossenen Bestellungen",,
|
||||
"My Ongoing Purchase orders","Meine laufenden Bestellungen",,
|
||||
"My Orders to process","Meine Bestellungen zur Bearbeitung",,
|
||||
"My Purchase orders","Meine Bestellungen",,
|
||||
"My Purchase request","Meine Kaufanfrage",,
|
||||
"My RFQs","Meine Anfragen",,
|
||||
"My RFQs and POs To Validate (Requested & Received)","Meine Anfragen und Bestellungen zur Validierung (angefordert & erhalten)",,
|
||||
"My Sales","Meine Verkäufe",,
|
||||
"My Validated POs","Meine validierten Bestellungen",,
|
||||
"My purchased amount by product accounting family",,,
|
||||
"My purchased qty by product accounting family",,,
|
||||
"Name","Name",,
|
||||
"Nbr of PO by month","Anzahl der Bestellungen pro Monat",,
|
||||
"New product","Neues Produkt",,
|
||||
"New version","Neue Version",,
|
||||
"Not invoiced","Nicht fakturiert",,
|
||||
"Not received","Nicht erhalten",,
|
||||
"OR","ODER",,
|
||||
"Ongoing Purchase orders","Laufende Bestellungen",,
|
||||
"Order Date","Bestelldatum",,
|
||||
"Ordered","Bestellt",,
|
||||
"Overview","Übersicht",,
|
||||
"PO Management","Bestellmanagement",,
|
||||
"PO Tax line","PO Steuerzeile",,
|
||||
"PO Tax lines","PO Steuerzeilen",,
|
||||
"PO line","PO-Linie",,
|
||||
"PO lines","Postleitzahlen",,
|
||||
"PO lines detail","Detail",,
|
||||
"POs Volume by buyer by accounting family",,,
|
||||
"Partial delivery","Teillieferung",,
|
||||
"Partially invoiced","Teilweise abgerechnet",,
|
||||
"Partially received","Teilweise erhalten",,
|
||||
"Partner price lists","Partner-Preislisten",,
|
||||
"Percent","Prozent",,
|
||||
"Please enter at least one detail line.",,,
|
||||
"Please enter supplier for following purchase request : %s",,,
|
||||
"Please fill printing settings on following purchase orders: %s","Bitte füllen Sie die Druckeinstellungen für folgende Bestellungen aus: %s",,
|
||||
"Please fill printing settings on purchase order %s","Bitte füllen Sie die Druckeinstellungen auf der Bestellung %s aus.",,
|
||||
"Please select the purchase order(s) to print.","Bitte wählen Sie die Bestellung(en) aus, die Sie drucken möchten.",,
|
||||
"Price List","Preisliste",,
|
||||
"Price list","Preisliste",,
|
||||
"Price lists","Preislisten",,
|
||||
"Print","Drucken",,
|
||||
"Printing","Drucken",,
|
||||
"Printing settings","Druckeinstellungen",,
|
||||
"Product","Produkt",,
|
||||
"Product Accounting Family",,,
|
||||
"Product code on catalog","Produktcode im Katalog",,
|
||||
"Product name on catalog","Produktname im Katalog",,
|
||||
"Products & services","Produkte & Dienstleistungen",,
|
||||
"Products list","Produktliste",,
|
||||
"Purchase","Kaufen",,
|
||||
"Purchase Buyer","Käufer kaufen",,
|
||||
"Purchase Manager","Einkaufsleiter",,
|
||||
"Purchase blocking","Kaufsperre",,
|
||||
"Purchase config","Kauf-Konfiguration",,
|
||||
"Purchase config (${ name })","Kauf-Konfiguration (${ Name })",,
|
||||
"Purchase configuration","Kauf-Konfiguration",,
|
||||
"Purchase configurations","Konfigurationen kaufen",,
|
||||
"Purchase order","Bestellung",,
|
||||
"Purchase order created","Bestellung angelegt",,
|
||||
"Purchase order information","Bestellinformationen",,
|
||||
"Purchase orders","Bestellungen",,
|
||||
"Purchase orders ATI/WT","Bestellungen ATI/WT",,
|
||||
"Purchase orders Details","Details zu Bestellungen",,
|
||||
"Purchase orders to merge","Bestellungen zum Zusammenführen",,
|
||||
"Purchase quotations","Kaufangebote",,
|
||||
"Purchase request","Bestellanfrage",,
|
||||
"Purchase request creator","Ersteller der Bestellanforderung",,
|
||||
"PurchaseOrder.afterDiscount","nach einem Rabatt von",,
|
||||
"PurchaseOrder.base","Basis",,
|
||||
"PurchaseOrder.buyer","Käufer",,
|
||||
"PurchaseOrder.buyerEmail",,,
|
||||
"PurchaseOrder.buyerPhone",,,
|
||||
"PurchaseOrder.canceled","Abgesagt",,
|
||||
"PurchaseOrder.customer","Kunde",,
|
||||
"PurchaseOrder.customerRef","Kundenreferenz",,
|
||||
"PurchaseOrder.deliveryAddress","Lieferadresse",,
|
||||
"PurchaseOrder.deliveryDate","Liefertermin",,
|
||||
"PurchaseOrder.description","Beschreibung",,
|
||||
"PurchaseOrder.desiredDelivDate","Gewünschter Liefertermin",,
|
||||
"PurchaseOrder.discountAmount","Rabatt",,
|
||||
"PurchaseOrder.draft","Entwurf",,
|
||||
"PurchaseOrder.finished","Fertiggestellt",,
|
||||
"PurchaseOrder.invoicingAddress","Rechnungsadresse",,
|
||||
"PurchaseOrder.note","Hinweis",,
|
||||
"PurchaseOrder.order","Bestellung",,
|
||||
"PurchaseOrder.orderDate","Bestelldatum",,
|
||||
"PurchaseOrder.paymentCondition","Zahlungsbedingungen",,
|
||||
"PurchaseOrder.paymentMode","Zahlungsmethode",,
|
||||
"PurchaseOrder.priceExclTax","Betrag ohne Steuern",,
|
||||
"PurchaseOrder.priceInclTax","Betrag inkl. Steuern",,
|
||||
"PurchaseOrder.productSequence",,,
|
||||
"PurchaseOrder.productStandard",,,
|
||||
"PurchaseOrder.purchaseInfo","Kaufinformationen",,
|
||||
"PurchaseOrder.qtyUnit","Menge",,
|
||||
"PurchaseOrder.quote","RFQ",,
|
||||
"PurchaseOrder.ref","Referenz",,
|
||||
"PurchaseOrder.reference","Referenz",,
|
||||
"PurchaseOrder.requested","Angefordert",,
|
||||
"PurchaseOrder.state","Status",,
|
||||
"PurchaseOrder.statusCanceled","Bestellung storniert",,
|
||||
"PurchaseOrder.statusDraft","Bestellvorschlag",,
|
||||
"PurchaseOrder.statusFinished","Bestellung abgeschlossen",,
|
||||
"PurchaseOrder.statusRequested","Bestellung angefordert",,
|
||||
"PurchaseOrder.statusValidated","Bestellung validiert",,
|
||||
"PurchaseOrder.supplier","Lieferant",,
|
||||
"PurchaseOrder.supplierCode",,,
|
||||
"PurchaseOrder.supplyRef","Lieferantenreferenz",,
|
||||
"PurchaseOrder.tax","Steuer",,
|
||||
"PurchaseOrder.taxAmount","Steuerbetrag",,
|
||||
"PurchaseOrder.totalDiscount","Rabatt",,
|
||||
"PurchaseOrder.totalExclTax","Gesamt ohne Steuern",,
|
||||
"PurchaseOrder.totalExclTaxWithoutDiscount","Gesamtbrutto ohne Steuern",,
|
||||
"PurchaseOrder.totalInclTax","Gesamt Inc. Steuer",,
|
||||
"PurchaseOrder.totalTax","Gesamtsteuer",,
|
||||
"PurchaseOrder.unitPrice","Stückpreis",,
|
||||
"PurchaseOrder.validated","Validiert",,
|
||||
"Purchased","Gekauft",,
|
||||
"Purchased amount by accounting family",,,
|
||||
"Purchased amount by product accounting family",,,
|
||||
"Purchased amount distribution by accounting family",,,
|
||||
"Purchases","Einkäufe",,
|
||||
"Purchases Order filters","Bestellungen Bestellfilter",,
|
||||
"Purchases follow-up","Verfolgung der Einkäufe",,
|
||||
"Purchases unit","Einkaufseinheit",,
|
||||
"Qty","Anzahl",,
|
||||
"Quantity","Menge",,
|
||||
"Quantity min","Menge min",,
|
||||
"Quotation","Angebot",,
|
||||
"RFQ And PO To Validate","Anfrage und Bestellung zur Validierung",,
|
||||
"Receipt State","Empfangsstatus",,
|
||||
"Received","Erhalten",,
|
||||
"Received quantity","Erhaltene Menge",,
|
||||
"Ref.","Ref.",,
|
||||
"Reference already existing","Referenz bereits vorhanden",,
|
||||
"References","Referenzen",,
|
||||
"Refuse","Ablehnen",,
|
||||
"Refused","Abgelehnt",,
|
||||
"Reportings","Berichte",,
|
||||
"Reports","Berichte",,
|
||||
"Request","Anfrage",,
|
||||
"Requested","Angefordert",,
|
||||
"Reverse charged","Rückwärtsladung",,
|
||||
"Sale orders","Verkaufsaufträge",,
|
||||
"Sale price","Verkaufspreis",,
|
||||
"Sale quotations","Verkaufsangebote",,
|
||||
"See budget distribution lines",,,
|
||||
"See purchase order lines","Siehe Bestellzeilen",,
|
||||
"See purchase orders lines",,,
|
||||
"See quotation lines","Siehe Angebotszeilen",,
|
||||
"Send Email","E-Mail senden",,
|
||||
"Send email","E-Mail senden",,
|
||||
"Seq.","Seq.",,
|
||||
"Shipping Coefficients","Versandkoeffizienten",,
|
||||
"Show invoice","Rechnung anzeigen",,
|
||||
"Start date",,,
|
||||
"Status","Status",,
|
||||
"Stock location","Lagerort",,
|
||||
"Stock move","Lagerbewegung",,
|
||||
"Supplier","Lieferant",,
|
||||
"Supplier Catalog","Lieferantenkatalog",,
|
||||
"Supplier Catalog Lines","Lieferantenkatalog-Linien",,
|
||||
"Supplier Comment","Lieferantenkommentar",,
|
||||
"Supplier RFQ/PO","Lieferantenanfrage/PO",,
|
||||
"Supplier RFQs/POs","Lieferantenanfragen/POs",,
|
||||
"Supplier box in purchase order","Lieferantenbox in der Bestellung",,
|
||||
"Supplier catalog","Lieferantenkatalog",,
|
||||
"Supplier code",,,
|
||||
"Supplier invoices","Lieferantenrechnungen",,
|
||||
"Supplier is required to generate a purchase order.",,,
|
||||
"Supplier ref.","Lieferantenreferenz",,
|
||||
"Suppliers","Lieferanten",,
|
||||
"Suppliers Map","Lieferantenkarte",,
|
||||
"Suppliers requests","Anfragen von Lieferanten",,
|
||||
"Tax","Steuer",,
|
||||
"Tax Equiv","Steueräquivalente",,
|
||||
"Tax Lines","Steuerzeilen",,
|
||||
"Team","Team",,
|
||||
"The company %s doesn't have any configured sequence for the purchase orders","Die Firma %s hat keine konfigurierte Reihenfolge für die Bestellungen.",,
|
||||
"The company is required and must be the same for all purchase orders","Die Firma ist erforderlich und muss für alle Bestellungen gleich sein.",,
|
||||
"The currency is required and must be the same for all purchase orders","Die Währung ist erforderlich und muss für alle Bestellungen gleich sein.",,
|
||||
"The field 'Stock Location' must be filled.","Das Feld'Lagerort' muss ausgefüllt werden.",,
|
||||
"The line cannot be null.","Die Zeile darf nicht Null sein.",,
|
||||
"The minimum order quantity of %s to the supplier is not respected.","Die Mindestbestellmenge von %s an den Lieferanten wird nicht eingehalten.",,
|
||||
"The supplier Partner is required and must be the same for all purchase orders","Der Lieferantenpartner ist erforderlich und muss für alle Bestellungen gleich sein.",,
|
||||
"The trading name must be the same for all purchase orders","Der Handelsname muss für alle Bestellungen gleich sein.",,
|
||||
"There is no sequence set for the purchase requests for the company %s",,,
|
||||
"This product is not available from the supplier.","Dieses Produkt ist nicht beim Lieferanten erhältlich.",,
|
||||
"This supplier is blocked:","Dieser Lieferant ist gesperrt:",,
|
||||
"Timetable","Zeitplan",,
|
||||
"Title","Titel",,
|
||||
"Title Line","Titelzeile",,
|
||||
"To Date","Bis heute",,
|
||||
"Tools","Werkzeuge",,
|
||||
"Total A.T.I.","Total A.T.I.",,
|
||||
"Total A.T.I. in company currency","Gesamt A.T.I. in Firmenwährung",,
|
||||
"Total Purchased Amount by month","Gesamter Kaufbetrag pro Monat",,
|
||||
"Total Purchased Qty by month","Gesamte gekaufte Menge pro Monat",,
|
||||
"Total Tax","Gesamtsteuer",,
|
||||
"Total W.T.","Gesamt W.T.",,
|
||||
"Total W.T. in company currency","Gesamt W.T. in Firmenwährung",,
|
||||
"Total tax","Gesamtsteuer",,
|
||||
"Trading name","Handelsname",,
|
||||
"Turn Over","Umschlag",,
|
||||
"Unit","Einheit",,
|
||||
"Unit price","Stückpreis",,
|
||||
"Unit price A.T.I.","Stückpreis A.T.I.",,
|
||||
"Unit price W.T.","Stückpreis W.T.",,
|
||||
"Unit price discounted","Einzelpreis rabattiert",,
|
||||
"Units","Einheiten",,
|
||||
"Update lines with selected project","Zeilen mit dem ausgewählten Projekt aktualisieren",,
|
||||
"Validate","Validieren",,
|
||||
"Validated","Validiert",,
|
||||
"Validated by","Validiert durch",,
|
||||
"Validation date","Validierungsdatum",,
|
||||
"Version Number","Versionsnummer",,
|
||||
"WT","WT",,
|
||||
"Warning, a completed order can't be changed anymore, do you want to continue?","Achtung, ein abgeschlossener Auftrag kann nicht mehr geändert werden, willst du fortfahren?",,
|
||||
"You have to choose at least one purchase order","Sie müssen mindestens eine Bestellung auswählen.",,
|
||||
"You must configure Purchase module for the company %s","Sie müssen das Einkaufsmodul für die Firma %s konfigurieren.",,
|
||||
"You need a purchase order associated to line.","Sie benötigen eine Bestellung, die der Zeile zugeordnet ist.",,
|
||||
"important","wichtig",,
|
||||
"info","Info",,
|
||||
"success","Erfolg",,
|
||||
"value:Purchase","Wert:Kauf",,
|
||||
"value:Purchase Request","Wert: Bestellanforderung",,
|
||||
"warning","Warnung",,
|
||||
"{{ company.name }}","{{Firmen.name }}",,
|
||||
"{{ stockLocation.name }}","{{stockLocation.name }}",,
|
||||
|
@ -0,0 +1,346 @@
|
||||
"key","message","comment","context"
|
||||
"50 Latest Supplier Orders",,,
|
||||
"A tax line is missing",,,
|
||||
"ABC analysis",,,
|
||||
"ATI",,,
|
||||
"AbcAnalysis.endDate","End date: ",,
|
||||
"AbcAnalysis.startDate","Start date: ",,
|
||||
"Accept",,,
|
||||
"Accept and generate PO",,,
|
||||
"Accepted",,,
|
||||
"Actions",,,
|
||||
"Add",,,
|
||||
"All requests accepted",,,
|
||||
"All requests sent",,,
|
||||
"Amount",,,
|
||||
"Amount A.T.I.",,,
|
||||
"Amount Tax",,,
|
||||
"Amount invoiced W.T.",,,
|
||||
"Amount to be spread over the timetable",,,
|
||||
"Analytic distribution",,,
|
||||
"Analytic distribution required on purchase order line",,,
|
||||
"Analytics",,,
|
||||
"App purchase",,,
|
||||
"Apply to all",,,
|
||||
"Attributes",,,
|
||||
"Base W.T.",,,
|
||||
"Budget",,,
|
||||
"Budget distribution",,,
|
||||
"Business Project",,,
|
||||
"Business project",,,
|
||||
"Buyer",,,
|
||||
"Calculated price/Qty",,,
|
||||
"Cancel",,,
|
||||
"Cancel receipt",,,
|
||||
"Canceled",,,
|
||||
"Characteristics","Caractéristiques",,
|
||||
"Closed Purchase orders",,,
|
||||
"Code",,,
|
||||
"Company",,,
|
||||
"Company bank",,,
|
||||
"Configuration",,,
|
||||
"Confirm",,,
|
||||
"Confirm my cart",,,
|
||||
"Confirmation",,,
|
||||
"Contact",,,
|
||||
"Contact partner",,,
|
||||
"Contacts",,,
|
||||
"Content",,,
|
||||
"Currency",,,
|
||||
"Current Purchase orders",,,
|
||||
"Custom field",,,
|
||||
"Custom fields",,,
|
||||
"Dashboard",,,
|
||||
"Dates",,,
|
||||
"Deliver",,,
|
||||
"Deliver Partially",,,
|
||||
"Delivery",,,
|
||||
"Description",,,
|
||||
"Description To Display",,,
|
||||
"Desired receipt date",,,
|
||||
"Discount Type",,,
|
||||
"Discount amount",,,
|
||||
"Discount rate",,,
|
||||
"Display buyer on printing",,,
|
||||
"Display price on requested purchase printing",,,
|
||||
"Display product code on printing",,,
|
||||
"Display product detail on printing",,,
|
||||
"Display purchase order line number",,,
|
||||
"Display supplier code on printing",,,
|
||||
"Display tax detail on printing",,,
|
||||
"Displayed Product name",,,
|
||||
"Draft",,,
|
||||
"Enable product description copy",,,
|
||||
"End date",,,
|
||||
"Estim. receipt date",,,
|
||||
"Estimated delivery Date",,,
|
||||
"Filter on supplier",,,
|
||||
"Finish the order",,,
|
||||
"Finished",,,
|
||||
"Fixed Assets",,,
|
||||
"Follow-up",,,
|
||||
"From Date",,,
|
||||
"Full name",,,
|
||||
"Generate PO",,,
|
||||
"Generate control invoice",,,
|
||||
"Generate purchase configurations",,,
|
||||
"Generate supplier arrival",,,
|
||||
"Generate suppliers requests",,,
|
||||
"Group by product",,,
|
||||
"Group by supplier",,,
|
||||
"Historical",,,
|
||||
"Historical Period",,,
|
||||
"In ATI",,,
|
||||
"In Stock Moves",,,
|
||||
"Information",,,
|
||||
"Internal Note",,,
|
||||
"Internal Ref.",,,
|
||||
"Internal note",,,
|
||||
"Internal purchase requests",,,
|
||||
"Invoice Lines",,,
|
||||
"Invoiced",,,
|
||||
"Invoices",,,
|
||||
"Invoicing",,,
|
||||
"Last update",,,
|
||||
"Manage multiple purchase quantity",,,
|
||||
"Manage purchase order versions",,,
|
||||
"Manage purchases unit on products",,,
|
||||
"Manage supplier catalog",,,
|
||||
"Merge into single purchase order",,,
|
||||
"Merge purchase orders",,,
|
||||
"Merge quotations",,,
|
||||
"Message for requesting prices",,,
|
||||
"Min sale price",,,
|
||||
"Month",,,
|
||||
"My Closed Purchase orders",,,
|
||||
"My Ongoing Purchase orders",,,
|
||||
"My Orders to process",,,
|
||||
"My Purchase orders",,,
|
||||
"My Purchase request",,,
|
||||
"My RFQs",,,
|
||||
"My RFQs and POs To Validate (Requested & Received)",,,
|
||||
"My Sales",,,
|
||||
"My Validated POs",,,
|
||||
"My purchased amount by product accounting family",,,
|
||||
"My purchased qty by product accounting family",,,
|
||||
"Name",,,
|
||||
"Nbr of PO by month",,,
|
||||
"New product",,,
|
||||
"New version",,,
|
||||
"Not invoiced",,,
|
||||
"Not received",,,
|
||||
"OR",,,
|
||||
"Ongoing Purchase orders",,,
|
||||
"Order Date",,,
|
||||
"Ordered",,,
|
||||
"Overview",,,
|
||||
"PO Management",,,
|
||||
"PO Tax line",,,
|
||||
"PO Tax lines",,,
|
||||
"PO line",,,
|
||||
"PO lines",,,
|
||||
"PO lines detail","Detail",,
|
||||
"POs Volume by buyer by accounting family",,,
|
||||
"Partial delivery",,,
|
||||
"Partially invoiced",,,
|
||||
"Partially received",,,
|
||||
"Partner price lists",,,
|
||||
"Percent",,,
|
||||
"Please enter at least one detail line.",,,
|
||||
"Please enter supplier for following purchase request : %s",,,
|
||||
"Please fill printing settings on following purchase orders: %s",,,
|
||||
"Please fill printing settings on purchase order %s",,,
|
||||
"Please select the purchase order(s) to print.",,,
|
||||
"Price List",,,
|
||||
"Price list",,,
|
||||
"Price lists",,,
|
||||
"Print",,,
|
||||
"Printing",,,
|
||||
"Printing settings",,,
|
||||
"Product",,,
|
||||
"Product Accounting Family",,,
|
||||
"Product code on catalog",,,
|
||||
"Product name on catalog",,,
|
||||
"Products & services",,,
|
||||
"Products list",,,
|
||||
"Purchase",,,
|
||||
"Purchase Buyer",,,
|
||||
"Purchase Manager",,,
|
||||
"Purchase Request Line",,,
|
||||
"Purchase Request Lines",,,
|
||||
"Purchase blocking",,,
|
||||
"Purchase config",,,
|
||||
"Purchase config (${ name })",,,
|
||||
"Purchase configuration",,,
|
||||
"Purchase configurations",,,
|
||||
"Purchase order",,,
|
||||
"Purchase order created",,,
|
||||
"Purchase order information",,,
|
||||
"Purchase orders",,,
|
||||
"Purchase orders ATI/WT",,,
|
||||
"Purchase orders Details",,,
|
||||
"Purchase orders to merge",,,
|
||||
"Purchase quotations",,,
|
||||
"Purchase request",,,
|
||||
"Purchase request creator",,,
|
||||
"PurchaseOrder.afterDiscount","after a discount of",,
|
||||
"PurchaseOrder.base","Base",,
|
||||
"PurchaseOrder.buyer","Buyer",,
|
||||
"PurchaseOrder.buyerEmail","Email",,
|
||||
"PurchaseOrder.buyerPhone","Phone",,
|
||||
"PurchaseOrder.canceled","Canceled",,
|
||||
"PurchaseOrder.customer","Customer",,
|
||||
"PurchaseOrder.customerRef","Customer reference",,
|
||||
"PurchaseOrder.deliveryAddress","Delivery address",,
|
||||
"PurchaseOrder.deliveryDate","Delivery date",,
|
||||
"PurchaseOrder.description","Description",,
|
||||
"PurchaseOrder.desiredDelivDate","Desired receipt date",,
|
||||
"PurchaseOrder.discountAmount","Discount",,
|
||||
"PurchaseOrder.draft","Draft",,
|
||||
"PurchaseOrder.finished","Finished",,
|
||||
"PurchaseOrder.invoicingAddress","Invoicing address",,
|
||||
"PurchaseOrder.note","Note",,
|
||||
"PurchaseOrder.order","Order",,
|
||||
"PurchaseOrder.orderDate","Order date",,
|
||||
"PurchaseOrder.paymentCondition","Payment Condition",,
|
||||
"PurchaseOrder.paymentMode","Payment Mode",,
|
||||
"PurchaseOrder.priceExclTax","Amount Excl. Tax",,
|
||||
"PurchaseOrder.priceInclTax","Amount Incl. Tax",,
|
||||
"PurchaseOrder.productSequence","Sequence",,
|
||||
"PurchaseOrder.productStandard","Standard",,
|
||||
"PurchaseOrder.purchaseInfo","Purchase info.",,
|
||||
"PurchaseOrder.qtyUnit","Quantity",,
|
||||
"PurchaseOrder.quote","RFQ",,
|
||||
"PurchaseOrder.ref","Reference",,
|
||||
"PurchaseOrder.reference","Reference",,
|
||||
"PurchaseOrder.requested","Requested",,
|
||||
"PurchaseOrder.state","Status",,
|
||||
"PurchaseOrder.statusCanceled","Purchase order canceled",,
|
||||
"PurchaseOrder.statusDraft","Purchase order draft",,
|
||||
"PurchaseOrder.statusFinished","Purchase order finished",,
|
||||
"PurchaseOrder.statusRequested","Purchase order requested",,
|
||||
"PurchaseOrder.statusValidated","Purchase order validated",,
|
||||
"PurchaseOrder.supplier","Supplier",,
|
||||
"PurchaseOrder.supplierCode","Supplier code",,
|
||||
"PurchaseOrder.supplyRef","Supplier reference",,
|
||||
"PurchaseOrder.tax","Tax",,
|
||||
"PurchaseOrder.taxAmount","Tax Amount",,
|
||||
"PurchaseOrder.totalDiscount","Discount",,
|
||||
"PurchaseOrder.totalExclTax","Total Excl. Tax",,
|
||||
"PurchaseOrder.totalExclTaxWithoutDiscount","Total gross Excl. Tax",,
|
||||
"PurchaseOrder.totalInclTax","Total Inc. Tax",,
|
||||
"PurchaseOrder.totalTax","Total Tax",,
|
||||
"PurchaseOrder.unitPrice","Unit price",,
|
||||
"PurchaseOrder.validated","Validated",,
|
||||
"Purchased",,,
|
||||
"Purchased amount by accounting family",,,
|
||||
"Purchased amount by product accounting family",,,
|
||||
"Purchased amount distribution by accounting family",,,
|
||||
"Purchases",,,
|
||||
"Purchases Order filters",,,
|
||||
"Purchases follow-up",,,
|
||||
"Purchases unit",,,
|
||||
"Qty",,,
|
||||
"Quantity",,,
|
||||
"Quantity min",,,
|
||||
"Quotation",,,
|
||||
"RFQ And PO To Validate",,,
|
||||
"Receipt State",,,
|
||||
"Received",,,
|
||||
"Received quantity",,,
|
||||
"Ref.",,,
|
||||
"Reference already existing",,,
|
||||
"References",,,
|
||||
"Refuse",,,
|
||||
"Refused",,,
|
||||
"Reportings",,,
|
||||
"Reports",,,
|
||||
"Request",,,
|
||||
"Requested",,,
|
||||
"Reverse charged",,,
|
||||
"Sale orders",,,
|
||||
"Sale price",,,
|
||||
"Sale quotations",,,
|
||||
"See budget distribution lines",,,
|
||||
"See purchase order lines",,,
|
||||
"See purchase orders lines",,,
|
||||
"See quotation lines",,,
|
||||
"Send Email",,,
|
||||
"Send email",,,
|
||||
"Seq.",,,
|
||||
"Shipping Coefficients",,,
|
||||
"Show invoice",,,
|
||||
"Start date",,,
|
||||
"Status",,,
|
||||
"Stock location",,,
|
||||
"Stock move",,,
|
||||
"Supplier",,,
|
||||
"Supplier Catalog",,,
|
||||
"Supplier Catalog Lines",,,
|
||||
"Supplier Comment",,,
|
||||
"Supplier RFQ/PO",,,
|
||||
"Supplier RFQs/POs",,,
|
||||
"Supplier box in purchase order",,,
|
||||
"Supplier catalog",,,
|
||||
"Supplier code",,,
|
||||
"Supplier invoices",,,
|
||||
"Supplier is required to generate a purchase order.",,,
|
||||
"Supplier ref.",,,
|
||||
"Suppliers",,,
|
||||
"Suppliers Map",,,
|
||||
"Suppliers requests",,,
|
||||
"Tax",,,
|
||||
"Tax Equiv",,,
|
||||
"Tax Lines",,,
|
||||
"Team",,,
|
||||
"The company %s doesn't have any configured sequence for the purchase orders",,,
|
||||
"The company is required and must be the same for all purchase orders",,,
|
||||
"The currency is required and must be the same for all purchase orders",,,
|
||||
"The field 'Stock Location' must be filled.",,,
|
||||
"The line cannot be null.",,,
|
||||
"The minimum order quantity of %s to the supplier is not respected.",,,
|
||||
"The supplier Partner is required and must be the same for all purchase orders",,,
|
||||
"The trading name must be the same for all purchase orders",,,
|
||||
"There is no sequence set for the purchase requests for the company %s",,,
|
||||
"This product is not available from the supplier.",,,
|
||||
"This supplier is blocked:",,,
|
||||
"Timetable",,,
|
||||
"Title",,,
|
||||
"Title Line",,,
|
||||
"To Date",,,
|
||||
"Tools",,,
|
||||
"Total A.T.I.",,,
|
||||
"Total A.T.I. in company currency",,,
|
||||
"Total Purchased Amount by month",,,
|
||||
"Total Purchased Qty by month",,,
|
||||
"Total Tax",,,
|
||||
"Total W.T.",,,
|
||||
"Total W.T. in company currency",,,
|
||||
"Total tax",,,
|
||||
"Trading name",,,
|
||||
"Turn Over",,,
|
||||
"Unit",,,
|
||||
"Unit price",,,
|
||||
"Unit price A.T.I.",,,
|
||||
"Unit price W.T.",,,
|
||||
"Unit price discounted",,,
|
||||
"Units",,,
|
||||
"Update lines with selected project",,,
|
||||
"Validate",,,
|
||||
"Validated",,,
|
||||
"Validated by",,,
|
||||
"Validation date",,,
|
||||
"Version Number",,,
|
||||
"WT",,,
|
||||
"Warning, a completed order can't be changed anymore, do you want to continue?","Warning, a completed order can't be changed anymore, do you want to continue?",,
|
||||
"You have to choose at least one purchase order",,,
|
||||
"You must configure Purchase module for the company %s",,,
|
||||
"You need a purchase order associated to line.",,,
|
||||
"important",,,
|
||||
"info",,,
|
||||
"success",,,
|
||||
"value:Purchase",,,
|
||||
"value:Purchase Request",,,
|
||||
"warning",,,
|
||||
"{{ company.name }}",,,
|
||||
"{{ stockLocation.name }}",,,
|
||||
|
@ -0,0 +1,344 @@
|
||||
"key","message","comment","context"
|
||||
"50 Latest Supplier Orders","50 Últimos pedidos de proveedores",,
|
||||
"A tax line is missing","Falta una línea de impuestos",,
|
||||
"ABC analysis",,,
|
||||
"ATI","ATI",,
|
||||
"AbcAnalysis.endDate",,,
|
||||
"AbcAnalysis.startDate",,,
|
||||
"Accept","Aceptar",,
|
||||
"Accept and generate PO","Aceptar y generar un pedido",,
|
||||
"Accepted","Aceptado",,
|
||||
"Actions","Acciones",,
|
||||
"Add","Añadir",,
|
||||
"All requests accepted","Todas las solicitudes aceptadas",,
|
||||
"All requests sent","Todas las solicitudes enviadas",,
|
||||
"Amount","Importe",,
|
||||
"Amount A.T.I.","Importe I.T.A.",,
|
||||
"Amount Tax",,,
|
||||
"Amount invoiced W.T.","Importe facturado W.T.",,
|
||||
"Amount to be spread over the timetable","Importe que debe repartirse a lo largo del calendario",,
|
||||
"Analytic distribution",,,
|
||||
"Analytic distribution required on purchase order line",,,
|
||||
"Analytics","Analítica",,
|
||||
"App purchase","Compra de aplicaciones",,
|
||||
"Apply to all","Aplicar a todos",,
|
||||
"Attributes","Atributos",,
|
||||
"Base W.T.","Base W.T.",,
|
||||
"Budget","Presupuesto",,
|
||||
"Budget distribution","Distribución del presupuesto",,
|
||||
"Business Project","Proyecto Empresarial",,
|
||||
"Business project","Proyecto empresarial",,
|
||||
"Buyer","Comprador",,
|
||||
"Calculated price/Qty","Precio/cantidad calculado",,
|
||||
"Cancel","Cancelar",,
|
||||
"Cancel receipt","Cancelar recibo",,
|
||||
"Canceled","Cancelado",,
|
||||
"Characteristics","Características",,
|
||||
"Closed Purchase orders","Pedidos cerrados",,
|
||||
"Code",,,
|
||||
"Company","Empresa",,
|
||||
"Company bank","Banco de empresas",,
|
||||
"Configuration","Configuración",,
|
||||
"Confirm","Confirmar",,
|
||||
"Confirm my cart","Confirmar mi carrito",,
|
||||
"Confirmation","Confirmación",,
|
||||
"Contact","Contacto",,
|
||||
"Contact partner","Persona de contacto",,
|
||||
"Contacts","Contactos",,
|
||||
"Content","Contenido",,
|
||||
"Currency","Moneda",,
|
||||
"Current Purchase orders","Pedidos actuales",,
|
||||
"Custom field","Campo personalizado",,
|
||||
"Custom fields","Campos personalizados",,
|
||||
"Dashboard","Tablero de mandos",,
|
||||
"Dates","Fechas",,
|
||||
"Deliver","Entregar",,
|
||||
"Deliver Partially","Entregar parcialmente",,
|
||||
"Delivery","Entrega",,
|
||||
"Description","Descripción",,
|
||||
"Description To Display","Descripción de la pantalla",,
|
||||
"Desired receipt date",,,
|
||||
"Discount Type","Tipo de descuento",,
|
||||
"Discount amount","Importe del descuento",,
|
||||
"Discount rate","Tasa de descuento",,
|
||||
"Display buyer on printing","Mostrar comprador en la impresión",,
|
||||
"Display price on requested purchase printing","Visualización del precio en la impresión de la compra solicitada",,
|
||||
"Display product code on printing","Mostrar el código de producto en la impresión",,
|
||||
"Display product detail on printing","Visualizar el detalle del producto en la impresión",,
|
||||
"Display purchase order line number",,,
|
||||
"Display supplier code on printing",,,
|
||||
"Display tax detail on printing","Visualizar detalles de impuestos en la impresión",,
|
||||
"Displayed Product name","Nombre del producto",,
|
||||
"Draft","Proyecto de",,
|
||||
"Enable product description copy","Habilitar la copia de descripción del producto",,
|
||||
"End date",,,
|
||||
"Estim. receipt date",,,
|
||||
"Estimated delivery Date","Fecha estimada de entrega",,
|
||||
"Filter on supplier","Filtro en el proveedor",,
|
||||
"Finish the order","Finalizar el pedido",,
|
||||
"Finished","Acabado",,
|
||||
"Fixed Assets","Activos fijos",,
|
||||
"Follow-up","Seguimiento",,
|
||||
"From Date","Desde la fecha",,
|
||||
"Full name","Nombre completo",,
|
||||
"Generate PO","Generar pedido",,
|
||||
"Generate control invoice","Generar factura de control",,
|
||||
"Generate purchase configurations","Generar configuraciones de compra",,
|
||||
"Generate supplier arrival","Generar la llegada del proveedor",,
|
||||
"Generate suppliers requests","Generar solicitudes de proveedores",,
|
||||
"Group by product","Agrupar por producto",,
|
||||
"Group by supplier","Agrupar por proveedor",,
|
||||
"Historical","Histórico",,
|
||||
"Historical Period","Período Histórico",,
|
||||
"In ATI","En ATI",,
|
||||
"In Stock Moves","Movimientos en stock",,
|
||||
"Information","Información",,
|
||||
"Internal Note","Nota interna",,
|
||||
"Internal Ref.","Ref. interna",,
|
||||
"Internal note","Nota interna",,
|
||||
"Internal purchase requests",,,
|
||||
"Invoice Lines","Líneas de Factura",,
|
||||
"Invoiced","Facturado",,
|
||||
"Invoices","Facturas",,
|
||||
"Invoicing","Facturación",,
|
||||
"Last update","Última actualización",,
|
||||
"Manage multiple purchase quantity","Gestionar la cantidad de compras múltiples",,
|
||||
"Manage purchase order versions","Gestionar versiones de pedido",,
|
||||
"Manage purchases unit on products","Gestionar la unidad de compras de los productos",,
|
||||
"Manage supplier catalog","Gestionar el catálogo de proveedores",,
|
||||
"Merge into single purchase order","Fusionar en un solo pedido",,
|
||||
"Merge purchase orders","Fusionar pedidos",,
|
||||
"Merge quotations","Fusionar ofertas",,
|
||||
"Message for requesting prices","Mensaje para solicitar precios",,
|
||||
"Min sale price","Precio de venta mínimo",,
|
||||
"Month","Mes",,
|
||||
"My Closed Purchase orders","Mis órdenes de compra cerradas",,
|
||||
"My Ongoing Purchase orders","Mis órdenes de compra en curso",,
|
||||
"My Orders to process","Mis pedidos para procesar",,
|
||||
"My Purchase orders","Mis órdenes de compra",,
|
||||
"My Purchase request","Mi solicitud de compra",,
|
||||
"My RFQs","Mis peticiones de oferta",,
|
||||
"My RFQs and POs To Validate (Requested & Received)","Mis peticiones de oferta y órdenes de compra a validar (solicitadas y recibidas)",,
|
||||
"My Sales","Mis Ventas",,
|
||||
"My Validated POs","Mis OC validadas",,
|
||||
"My purchased amount by product accounting family",,,
|
||||
"My purchased qty by product accounting family",,,
|
||||
"Name","Nombre",,
|
||||
"Nbr of PO by month","Número de PO por mes",,
|
||||
"New product","Nuevo producto",,
|
||||
"New version","Nueva versión",,
|
||||
"Not invoiced","No facturado",,
|
||||
"Not received","No se ha recibido",,
|
||||
"OR","O",,
|
||||
"Ongoing Purchase orders","Pedidos en curso",,
|
||||
"Order Date","Fecha del pedido",,
|
||||
"Ordered","Pedido",,
|
||||
"Overview","Panorama general",,
|
||||
"PO Management","Gestión de pedidos",,
|
||||
"PO Tax line","PO Línea de impuestos",,
|
||||
"PO Tax lines","PO Líneas de impuestos",,
|
||||
"PO line","línea de pedido",,
|
||||
"PO lines","líneas de pedido",,
|
||||
"PO lines detail","Detalle",,
|
||||
"POs Volume by buyer by accounting family",,,
|
||||
"Partial delivery","Entrega parcial",,
|
||||
"Partially invoiced","Facturado parcialmente",,
|
||||
"Partially received","Parcialmente recibido",,
|
||||
"Partner price lists","Listas de precios de socios",,
|
||||
"Percent","Porcentaje",,
|
||||
"Please enter at least one detail line.",,,
|
||||
"Please enter supplier for following purchase request : %s",,,
|
||||
"Please fill printing settings on following purchase orders: %s","Por favor, rellene la configuración de impresión en las siguientes órdenes de compra: %s",,
|
||||
"Please fill printing settings on purchase order %s","Por favor, rellene la configuración de impresión en la orden de compra %s",,
|
||||
"Please select the purchase order(s) to print.","Por favor, seleccione la(s) orden(es) de compra que desea imprimir.",,
|
||||
"Price List","Lista de precios",,
|
||||
"Price list","Lista de precios",,
|
||||
"Price lists","Listas de precios",,
|
||||
"Print","Imprimir",,
|
||||
"Printing","Impresión",,
|
||||
"Printing settings","Ajustes de impresión",,
|
||||
"Product","Producto",,
|
||||
"Product Accounting Family",,,
|
||||
"Product code on catalog","Código de producto en el catálogo",,
|
||||
"Product name on catalog","Nombre del producto en el catálogo",,
|
||||
"Products & services","Productos y servicios",,
|
||||
"Products list","Lista de productos",,
|
||||
"Purchase","Comprar",,
|
||||
"Purchase Buyer","Comprador de la compra",,
|
||||
"Purchase Manager","Gerente de Compras",,
|
||||
"Purchase blocking","Bloqueo de compras",,
|
||||
"Purchase config","Configuración de compra",,
|
||||
"Purchase config (${ name })","Comprar config (${ nombre })",,
|
||||
"Purchase configuration","Configuración de compra",,
|
||||
"Purchase configurations","Configuraciones de compra",,
|
||||
"Purchase order","Pedido",,
|
||||
"Purchase order created","Pedido creado",,
|
||||
"Purchase order information","Información de la orden de compra",,
|
||||
"Purchase orders","Pedidos",,
|
||||
"Purchase orders ATI/WT","Pedidos ATI/WT",,
|
||||
"Purchase orders Details","Detalles de los pedidos",,
|
||||
"Purchase orders to merge","Órdenes de compra para fusionar",,
|
||||
"Purchase quotations","Ofertas de compra",,
|
||||
"Purchase request","Solicitud de compra",,
|
||||
"Purchase request creator","Creador de la solicitud de compra",,
|
||||
"PurchaseOrder.afterDiscount","después de un descuento de",,
|
||||
"PurchaseOrder.base","Base",,
|
||||
"PurchaseOrder.buyer","Comprador",,
|
||||
"PurchaseOrder.buyerEmail",,,
|
||||
"PurchaseOrder.buyerPhone",,,
|
||||
"PurchaseOrder.canceled","Cancelado",,
|
||||
"PurchaseOrder.customer","Cliente",,
|
||||
"PurchaseOrder.customerRef","Referencia del cliente",,
|
||||
"PurchaseOrder.deliveryAddress","Dirección de entrega",,
|
||||
"PurchaseOrder.deliveryDate","Fecha de entrega",,
|
||||
"PurchaseOrder.description","Descripción",,
|
||||
"PurchaseOrder.desiredDelivDate","Fecha de entrega deseada",,
|
||||
"PurchaseOrder.discountAmount","Descuento",,
|
||||
"PurchaseOrder.draft","Proyecto de",,
|
||||
"PurchaseOrder.finished","Acabado",,
|
||||
"PurchaseOrder.invoicingAddress","Dirección de facturación",,
|
||||
"PurchaseOrder.note","Nota",,
|
||||
"PurchaseOrder.order","Pedido",,
|
||||
"PurchaseOrder.orderDate","Fecha del pedido",,
|
||||
"PurchaseOrder.paymentCondition","Condición de pago",,
|
||||
"PurchaseOrder.paymentMode","Modo de pago",,
|
||||
"PurchaseOrder.priceExclTax","Importe sin IVA",,
|
||||
"PurchaseOrder.priceInclTax","Importe con IVA incluido",,
|
||||
"PurchaseOrder.productSequence",,,
|
||||
"PurchaseOrder.productStandard",,,
|
||||
"PurchaseOrder.purchaseInfo","Información de compra",,
|
||||
"PurchaseOrder.qtyUnit","Cantidad",,
|
||||
"PurchaseOrder.quote","PETICIÓN DE OFERTA",,
|
||||
"PurchaseOrder.ref","Referencia",,
|
||||
"PurchaseOrder.reference","Referencia",,
|
||||
"PurchaseOrder.requested","Solicitado",,
|
||||
"PurchaseOrder.state","Estado",,
|
||||
"PurchaseOrder.statusCanceled","Pedido cancelado",,
|
||||
"PurchaseOrder.statusDraft","Borrador de la orden de compra",,
|
||||
"PurchaseOrder.statusFinished","Pedido finalizado",,
|
||||
"PurchaseOrder.statusRequested","Pedido de pedido",,
|
||||
"PurchaseOrder.statusValidated","Orden de compra validada",,
|
||||
"PurchaseOrder.supplier","Proveedor",,
|
||||
"PurchaseOrder.supplierCode",,,
|
||||
"PurchaseOrder.supplyRef","Referencia del proveedor",,
|
||||
"PurchaseOrder.tax","Impuesto",,
|
||||
"PurchaseOrder.taxAmount","Importe del impuesto",,
|
||||
"PurchaseOrder.totalDiscount","Descuento",,
|
||||
"PurchaseOrder.totalExclTax","Total Excl. impuestos",,
|
||||
"PurchaseOrder.totalExclTaxWithoutDiscount","Total bruto Excl. impuestos",,
|
||||
"PurchaseOrder.totalInclTax","Total Inc. Impuesto",,
|
||||
"PurchaseOrder.totalTax","Impuesto total",,
|
||||
"PurchaseOrder.unitPrice","Precio unitario",,
|
||||
"PurchaseOrder.validated","Validado",,
|
||||
"Purchased","Comprado",,
|
||||
"Purchased amount by accounting family",,,
|
||||
"Purchased amount by product accounting family",,,
|
||||
"Purchased amount distribution by accounting family",,,
|
||||
"Purchases","Compras",,
|
||||
"Purchases Order filters","Filtros de pedidos de compras",,
|
||||
"Purchases follow-up","Seguimiento de compras",,
|
||||
"Purchases unit","Unidad de compras",,
|
||||
"Qty","Cantidad",,
|
||||
"Quantity","Cantidad",,
|
||||
"Quantity min","Cantidad min",,
|
||||
"Quotation","Cotización",,
|
||||
"RFQ And PO To Validate","RFQ y PO para validar",,
|
||||
"Receipt State","Estado de recepción",,
|
||||
"Received","Recibido",,
|
||||
"Received quantity","Cantidad recibida",,
|
||||
"Ref.","Ref.",,
|
||||
"Reference already existing","Referencia ya existente",,
|
||||
"References","Referencias",,
|
||||
"Refuse","Rechazar",,
|
||||
"Refused","Rechazado",,
|
||||
"Reportings","Reportajes",,
|
||||
"Reports","Informes",,
|
||||
"Request","Solicitar",,
|
||||
"Requested","Solicitado",,
|
||||
"Reverse charged","Anulación de imputación",,
|
||||
"Sale orders","Pedidos de venta",,
|
||||
"Sale price","Precio de venta",,
|
||||
"Sale quotations","Ofertas de venta",,
|
||||
"See budget distribution lines",,,
|
||||
"See purchase order lines","Ver líneas de pedido",,
|
||||
"See purchase orders lines",,,
|
||||
"See quotation lines","Ver líneas de presupuesto",,
|
||||
"Send Email","Enviar correo electrónico",,
|
||||
"Send email","Enviar correo electrónico",,
|
||||
"Seq.","Seq.",,
|
||||
"Shipping Coefficients","Coeficientes de transporte",,
|
||||
"Show invoice","Mostrar factura",,
|
||||
"Start date",,,
|
||||
"Status","Estado",,
|
||||
"Stock location","Ubicación del stock",,
|
||||
"Stock move","Movimiento de stock",,
|
||||
"Supplier","Proveedor",,
|
||||
"Supplier Catalog","Catálogo de proveedores",,
|
||||
"Supplier Catalog Lines","Líneas de catálogo de proveedores",,
|
||||
"Supplier Comment","Comentario del proveedor",,
|
||||
"Supplier RFQ/PO","Petición de oferta/PO de proveedor",,
|
||||
"Supplier RFQs/POs","Peticiones de oferta/ofertas de proveedor",,
|
||||
"Supplier box in purchase order","Caja del proveedor en el pedido",,
|
||||
"Supplier catalog","Catálogo de proveedores",,
|
||||
"Supplier code",,,
|
||||
"Supplier invoices","Facturas de proveedores",,
|
||||
"Supplier is required to generate a purchase order.",,,
|
||||
"Supplier ref.","Proveedor ref.",,
|
||||
"Suppliers","Proveedores",,
|
||||
"Suppliers Map","Mapa de proveedores",,
|
||||
"Suppliers requests","Solicitudes de proveedores",,
|
||||
"Tax","Impuesto",,
|
||||
"Tax Equiv","Equivalente de impuestos",,
|
||||
"Tax Lines","Líneas de impuestos",,
|
||||
"Team","Equipo",,
|
||||
"The company %s doesn't have any configured sequence for the purchase orders","La empresa %s no tiene ninguna secuencia configurada para los pedidos.",,
|
||||
"The company is required and must be the same for all purchase orders","La empresa es necesaria y debe ser la misma para todos los pedidos.",,
|
||||
"The currency is required and must be the same for all purchase orders","La moneda es necesaria y debe ser la misma para todos los pedidos.",,
|
||||
"The field 'Stock Location' must be filled.","El campo 'Stock Location' debe ser rellenado.",,
|
||||
"The line cannot be null.","La línea no puede ser nula.",,
|
||||
"The minimum order quantity of %s to the supplier is not respected.","No se respeta la cantidad mínima de pedido de %s al proveedor.",,
|
||||
"The supplier Partner is required and must be the same for all purchase orders","El socio proveedor es necesario y debe ser el mismo para todos los pedidos.",,
|
||||
"The trading name must be the same for all purchase orders","El nombre comercial debe ser el mismo para todos los pedidos.",,
|
||||
"There is no sequence set for the purchase requests for the company %s",,,
|
||||
"This product is not available from the supplier.","Este producto no está disponible en el proveedor.",,
|
||||
"This supplier is blocked:","Este proveedor está bloqueado:",,
|
||||
"Timetable","Calendario",,
|
||||
"Title","Título",,
|
||||
"Title Line","Línea de título",,
|
||||
"To Date","Hasta la fecha",,
|
||||
"Tools","Herramientas",,
|
||||
"Total A.T.I.","I.A.T.A. total.",,
|
||||
"Total A.T.I. in company currency","I.T.A. total en la moneda de la empresa",,
|
||||
"Total Purchased Amount by month","Cantidad total comprada por mes",,
|
||||
"Total Purchased Qty by month","Cantidad total comprada por mes",,
|
||||
"Total Tax","Impuesto total",,
|
||||
"Total W.T.","W.T. total",,
|
||||
"Total W.T. in company currency","Total T.I.F. en la moneda de la empresa",,
|
||||
"Total tax","Impuesto total",,
|
||||
"Trading name","Nombre comercial",,
|
||||
"Turn Over","Voltear",,
|
||||
"Unit","Unidad",,
|
||||
"Unit price","Precio unitario",,
|
||||
"Unit price A.T.I.","Precio unitario A.T.I.",,
|
||||
"Unit price W.T.","Precio unitario W.T.",,
|
||||
"Unit price discounted","Precio unitario descontado",,
|
||||
"Units","Unidades",,
|
||||
"Update lines with selected project","Líneas de actualización con el proyecto seleccionado",,
|
||||
"Validate","Validar",,
|
||||
"Validated","Validado",,
|
||||
"Validated by","Validado por",,
|
||||
"Validation date","Fecha de validación",,
|
||||
"Version Number","Número de versión",,
|
||||
"WT","WT",,
|
||||
"Warning, a completed order can't be changed anymore, do you want to continue?","Advertencia, una orden completa ya no puede ser cambiada, ¿quieres continuar?",,
|
||||
"You have to choose at least one purchase order","Debe seleccionar por lo menos un pedido.",,
|
||||
"You must configure Purchase module for the company %s","Debe configurar el módulo Compras para la empresa %s",,
|
||||
"You need a purchase order associated to line.","Se necesita un pedido asociado a la línea.",,
|
||||
"important","significativo",,
|
||||
"info","información",,
|
||||
"success","triunfo",,
|
||||
"value:Purchase","valor:Comprar",,
|
||||
"value:Purchase Request","valor:Solicitud de compra",,
|
||||
"warning","amonestación",,
|
||||
"{{ company.name }}","{{ company.name }}{empresa.name }}",,
|
||||
"{{ stockLocation.name }}","{{ stockLocation.name }}",,
|
||||
|
@ -0,0 +1,346 @@
|
||||
"key","message","comment","context"
|
||||
"50 Latest Supplier Orders","50 dernières commandes clients",,
|
||||
"A tax line is missing","Il manque une ligne de taxe",,
|
||||
"ABC analysis","Classification ABC",,
|
||||
"ATI",,,
|
||||
"AbcAnalysis.endDate","Date de fin : ",,
|
||||
"AbcAnalysis.startDate","Date de début : ",,
|
||||
"Accept",,,
|
||||
"Accept and generate PO","Accepter",,
|
||||
"Accepted",,,
|
||||
"Actions",,,
|
||||
"Add",,,
|
||||
"All requests accepted","Toutes les demandes acceptées",,
|
||||
"All requests sent","Toutes les demandes envoyées",,
|
||||
"Amount","Montant",,
|
||||
"Amount A.T.I.","Montant T.T.C.",,
|
||||
"Amount Tax","Montant taxe",,
|
||||
"Amount invoiced W.T.",,,
|
||||
"Amount to be spread over the timetable",,,
|
||||
"Analytic distribution","Distribution analytique",,
|
||||
"Analytic distribution required on purchase order line","Exiger un modèle de répartition analytique sur les lignes de commandes",,
|
||||
"Analytics","Analytique",,
|
||||
"App purchase","App Achats",,
|
||||
"Apply to all","Appliquer à tous",,
|
||||
"Attributes",,,
|
||||
"Base W.T.","Base H.T.",,
|
||||
"Budget",,,
|
||||
"Budget distribution","Répartition budgétaire",,
|
||||
"Business Project","Affaire",,
|
||||
"Business project",,,
|
||||
"Buyer","Acheteur",,
|
||||
"Calculated price/Qty",,,
|
||||
"Cancel","Annuler",,
|
||||
"Cancel receipt","Annuler la réception",,
|
||||
"Canceled","Annulé(e)",,
|
||||
"Characteristics","Caractéristiques",,
|
||||
"Closed Purchase orders","Commandes fournisseurs fermées",,
|
||||
"Code",,,
|
||||
"Company","Société",,
|
||||
"Company bank","RIB société",,
|
||||
"Configuration",,,
|
||||
"Confirm","Confirmer",,
|
||||
"Confirm my cart","Confirmer mon panier",,
|
||||
"Confirmation",,,
|
||||
"Contact","Contact",,
|
||||
"Contact partner","Contact",,
|
||||
"Contacts",,,
|
||||
"Content","Contenu",,
|
||||
"Currency","Devise",,
|
||||
"Current Purchase orders","Commandes fournisseurs en cours",,
|
||||
"Custom field",,,
|
||||
"Custom fields",,,
|
||||
"Dashboard","Tableau de bord",,
|
||||
"Dates",,,
|
||||
"Deliver","Livré",,
|
||||
"Deliver Partially","Livré partiellement",,
|
||||
"Delivery","Livraison",,
|
||||
"Description","Description",,
|
||||
"Description To Display","Description à Afficher",,
|
||||
"Desired receipt date","Date de réception souhaitée",,
|
||||
"Discount Type","Type de remise",,
|
||||
"Discount amount","Montant remise",,
|
||||
"Discount rate","Taux remise",,
|
||||
"Display buyer on printing","Afficher l'acheteur sur l'impression",,
|
||||
"Display price on requested purchase printing","Afficher les prix sur la demande de cotation",,
|
||||
"Display product code on printing",,,
|
||||
"Display product detail on printing","Afficher le détail des produits sur l'impression",,
|
||||
"Display purchase order line number","Afficher les numéros de lignes de commande",,
|
||||
"Display supplier code on printing","Afficher le code fournisseur sur l'impression",,
|
||||
"Display tax detail on printing",,,
|
||||
"Displayed Product name","Libellé produit à afficher",,
|
||||
"Draft","Brouillon",,
|
||||
"Enable product description copy","Activer la copie de description des produits",,
|
||||
"End date","Date de fin",,
|
||||
"Estim. receipt date","Date de réception estimée",,
|
||||
"Estimated delivery Date","Date de livraison estimée",,
|
||||
"Filter on supplier","Filtrer par le fournisseur",,
|
||||
"Finish the order","Terminer la commande",,
|
||||
"Finished","Terminé",,
|
||||
"Fixed Assets","Immobilisation",,
|
||||
"Follow-up",,,
|
||||
"From Date","Date de",,
|
||||
"Full name","Réf.",,
|
||||
"Generate PO","Générer achats",,
|
||||
"Generate control invoice","Générer facture de contrôle",,
|
||||
"Generate purchase configurations","Générer les configurations d'achat",,
|
||||
"Generate supplier arrival","Générer BR",,
|
||||
"Generate suppliers requests","Générer demandes de devis fourn.",,
|
||||
"Group by product","Grouper par produit",,
|
||||
"Group by supplier","Grouper par fournisseur",,
|
||||
"Historical","Historique",,
|
||||
"Historical Period","Période d'historique",,
|
||||
"In ATI",,,
|
||||
"In Stock Moves","Réceptions fournisseur",,
|
||||
"Information","Informations",,
|
||||
"Internal Note","Note interne",,
|
||||
"Internal Ref.","Réf. Interne",,
|
||||
"Internal note",,,
|
||||
"Internal purchase requests","Demandes d'achat interne",,
|
||||
"Invoice Lines","Lignes de facture",,
|
||||
"Invoiced","Facturé",,
|
||||
"Invoices","Factures",,
|
||||
"Invoicing","Facturation",,
|
||||
"Last update","Dernière modification",,
|
||||
"Manage multiple purchase quantity","Gestion des quantités multiples d'achat",,
|
||||
"Manage purchase order versions","Gérer les versions des commandes fournisseurs",,
|
||||
"Manage purchases unit on products","Gérer les unités d'achat sur les produits",,
|
||||
"Manage supplier catalog","Activer la gestion des catalogues fournisseurs",,
|
||||
"Merge into single purchase order","Fusionner dans une seule cmde fournisseur",,
|
||||
"Merge purchase orders","Fusionner cmdes fournisseurs",,
|
||||
"Merge quotations","Fusionner devis",,
|
||||
"Message for requesting prices","Message de demande de cotation",,
|
||||
"Min sale price","Prix de vente min.",,
|
||||
"Month","Mois",,
|
||||
"My Closed Purchase orders","Mes commandes fournisseurs clôturées",,
|
||||
"My Ongoing Purchase orders","Mes commandes fournisseurs en cours",,
|
||||
"My Orders to process","Mes commandes fournisseurs à traiter",,
|
||||
"My Purchase orders","Mes commandes fournisseurs à traiter",,
|
||||
"My Purchase request","Mes demandes d'achat",,
|
||||
"My RFQs","Mes demandes de devis ",,
|
||||
"My RFQs and POs To Validate (Requested & Received)","Mes demandes de devis ",,
|
||||
"My Sales","Mes ventes",,
|
||||
"My Validated POs","Mes commandes fournisseurs validées",,
|
||||
"My purchased amount by product accounting family","Mon volume d'achats (montant) par famille comptable de produits",,
|
||||
"My purchased qty by product accounting family","Mon volume d'achats (qté) par famille comptable de produits",,
|
||||
"Name",,,
|
||||
"Nbr of PO by month","Nbr de commandes par mois",,
|
||||
"New product","Nouveau produit",,
|
||||
"New version","Nouvelles version",,
|
||||
"Not invoiced",,,
|
||||
"Not received","Non reçue",,
|
||||
"OR","OU",,
|
||||
"Ongoing Purchase orders","Commandes fournisseurs en cours",,
|
||||
"Order Date","Date de commande",,
|
||||
"Ordered","Commandé",,
|
||||
"Overview","Vue d'ensemble",,
|
||||
"PO Management","Gestion commandes fournisseurs",,
|
||||
"PO Tax line","Ligne de taxes achat",,
|
||||
"PO Tax lines","Lignes de taxes achats",,
|
||||
"PO line","Ligne de Cmde",,
|
||||
"PO lines","Lignes de Cmde",,
|
||||
"PO lines detail","Détail",,
|
||||
"POs Volume by buyer by accounting family","Vol. d'achat par acheteur par famille comptable",,
|
||||
"Partial delivery","En cours de réception",,
|
||||
"Partially invoiced","Partiellement facturé",,
|
||||
"Partially received","Partiellement reçue",,
|
||||
"Partner price lists","Listes de prix pour tiers",,
|
||||
"Percent","Pourcentage",,
|
||||
"Please enter at least one detail line.","Veuillez entrer une ligne de détail.",,
|
||||
"Please enter supplier for following purchase request : %s","Veuillez entrer un fournisseur pour les demandes d'achats suivantes : %s",,
|
||||
"Please fill printing settings on following purchase orders: %s","Merci de remplir les paramètres d'impressions sur les commandes fournisseur suivantes : %s",,
|
||||
"Please fill printing settings on purchase order %s","Merci de remplir les paramètres d'impressions sur la commande fournisseur %s",,
|
||||
"Please select the purchase order(s) to print.","Merci de sélectionner les commandes fournisseur à imprimer.",,
|
||||
"Price List","Liste de prix",,
|
||||
"Price list","Liste de prix",,
|
||||
"Price lists","Listes de prix",,
|
||||
"Print","Imprimer",,
|
||||
"Printing",,,
|
||||
"Printing settings",,,
|
||||
"Product","Produit",,
|
||||
"Product Accounting Family","famille comptable de produits",,
|
||||
"Product code on catalog","Code du produit dans le catalogue",,
|
||||
"Product name on catalog","Nom du produit dans le catalogue",,
|
||||
"Products & services","Produits et services",,
|
||||
"Products list","Liste de produits",,
|
||||
"Purchase","Acheter",,
|
||||
"Purchase Buyer","Acheteur",,
|
||||
"Purchase Manager","Manager",,
|
||||
"Purchase Request Line",,,
|
||||
"Purchase Request Lines",,,
|
||||
"Purchase blocking","Blocage cmde fournisseur",,
|
||||
"Purchase config","Config. Achats",,
|
||||
"Purchase config (${ name })",,,
|
||||
"Purchase configuration","Configuration Achat",,
|
||||
"Purchase configurations","Configurations Achat",,
|
||||
"Purchase order",,,
|
||||
"Purchase order created","Commande fournisseur créée",,
|
||||
"Purchase order information","Information à la commande",,
|
||||
"Purchase orders","Commandes Fournisseurs",,
|
||||
"Purchase orders ATI/WT","Commandes d'achat en TTC/HT",,
|
||||
"Purchase orders Details","Details achats",,
|
||||
"Purchase orders to merge","Commandes fournisseurs à fusionner",,
|
||||
"Purchase quotations","Devis fournisseurs",,
|
||||
"Purchase request","Demandes d'achats",,
|
||||
"Purchase request creator","Configurateur formulaire DA",,
|
||||
"PurchaseOrder.afterDiscount","après remise de",,
|
||||
"PurchaseOrder.base","Base",,
|
||||
"PurchaseOrder.buyer","Acheteur",,
|
||||
"PurchaseOrder.buyerEmail","Email",,
|
||||
"PurchaseOrder.buyerPhone","Tél",,
|
||||
"PurchaseOrder.canceled","Annulé",,
|
||||
"PurchaseOrder.customer","Client",,
|
||||
"PurchaseOrder.customerRef","Référence client",,
|
||||
"PurchaseOrder.deliveryAddress","Adresse de livraison",,
|
||||
"PurchaseOrder.deliveryDate","Date de livraison",,
|
||||
"PurchaseOrder.description","Description",,
|
||||
"PurchaseOrder.desiredDelivDate","Date de réception souhaitée",,
|
||||
"PurchaseOrder.discountAmount","Remise",,
|
||||
"PurchaseOrder.draft","Brouillon",,
|
||||
"PurchaseOrder.finished","Terminée",,
|
||||
"PurchaseOrder.invoicingAddress","Adresse de facturation",,
|
||||
"PurchaseOrder.note","Remarque",,
|
||||
"PurchaseOrder.order","Commande",,
|
||||
"PurchaseOrder.orderDate","Date de commande",,
|
||||
"PurchaseOrder.paymentCondition","Condition de paiement",,
|
||||
"PurchaseOrder.paymentMode","Mode de paiement",,
|
||||
"PurchaseOrder.priceExclTax","Montant HT",,
|
||||
"PurchaseOrder.priceInclTax","Montant TTC",,
|
||||
"PurchaseOrder.productSequence","Séquence",,
|
||||
"PurchaseOrder.productStandard","Norme",,
|
||||
"PurchaseOrder.purchaseInfo","Info. d'achat",,
|
||||
"PurchaseOrder.qtyUnit","Qté / Unité",,
|
||||
"PurchaseOrder.quote","Demande de devis",,
|
||||
"PurchaseOrder.ref","Référence",,
|
||||
"PurchaseOrder.reference","Référence",,
|
||||
"PurchaseOrder.requested","Demandé",,
|
||||
"PurchaseOrder.state","Statut",,
|
||||
"PurchaseOrder.statusCanceled","Commande fournisseur annulée",,
|
||||
"PurchaseOrder.statusDraft","Commande fournisseur brouillon",,
|
||||
"PurchaseOrder.statusFinished","Commande fournisseur terminée",,
|
||||
"PurchaseOrder.statusRequested","Demande de prix",,
|
||||
"PurchaseOrder.statusValidated","Bon de commande",,
|
||||
"PurchaseOrder.supplier","Fournisseur",,
|
||||
"PurchaseOrder.supplierCode","Code fournisseur",,
|
||||
"PurchaseOrder.supplyRef","Référence fournisseur",,
|
||||
"PurchaseOrder.tax","TVA",,
|
||||
"PurchaseOrder.taxAmount","Montant TVA",,
|
||||
"PurchaseOrder.totalDiscount","Remise",,
|
||||
"PurchaseOrder.totalExclTax","Total HT",,
|
||||
"PurchaseOrder.totalExclTaxWithoutDiscount","Total HT brut",,
|
||||
"PurchaseOrder.totalInclTax","Total TTC",,
|
||||
"PurchaseOrder.totalTax","Total TVA",,
|
||||
"PurchaseOrder.unitPrice","Prix unitaire",,
|
||||
"PurchaseOrder.validated","Validé",,
|
||||
"Purchased","Acheté",,
|
||||
"Purchased amount by accounting family","Montants achats par famille comptable",,
|
||||
"Purchased amount by product accounting family","Montants achats par famille comptable de produits",,
|
||||
"Purchased amount distribution by accounting family","Répartition des achats par famille comptable",,
|
||||
"Purchases","Achats",,
|
||||
"Purchases Order filters","Filtres Achats",,
|
||||
"Purchases follow-up","Suivi",,
|
||||
"Purchases unit","Unité d'achat",,
|
||||
"Qty","Qté",,
|
||||
"Quantity","Quantité",,
|
||||
"Quantity min","Quantité min",,
|
||||
"Quotation",,,
|
||||
"RFQ And PO To Validate","Devis et Cmde à valider",,
|
||||
"Receipt State","Etat de réception",,
|
||||
"Received","Reçu(e)",,
|
||||
"Received quantity","Quantité reçue",,
|
||||
"Ref.","Réf.",,
|
||||
"Reference already existing","Référence déjà existante",,
|
||||
"References",,,
|
||||
"Refuse",,,
|
||||
"Refused","Refusé",,
|
||||
"Reportings","Rapports",,
|
||||
"Reports",,,
|
||||
"Request",,,
|
||||
"Requested","Demandé",,
|
||||
"Reverse charged",,,
|
||||
"Sale orders","Commandes client",,
|
||||
"Sale price","Prix de vente",,
|
||||
"Sale quotations",,,
|
||||
"See budget distribution lines",,,
|
||||
"See purchase order lines","Voir lignes cmdes",,
|
||||
"See purchase orders lines","Voir lignes de cmdes",,
|
||||
"See quotation lines",,,
|
||||
"Send Email","Envoyer Email",,
|
||||
"Send email","Envoyer Email",,
|
||||
"Seq.","Séq.",,
|
||||
"Shipping Coefficients","Coef. de frais d'approche",,
|
||||
"Show invoice","Voir facture",,
|
||||
"Start date","Date de début",,
|
||||
"Status","Statut",,
|
||||
"Stock location",,,
|
||||
"Stock move",,,
|
||||
"Supplier","Fournisseur",,
|
||||
"Supplier Catalog","Catalogue fournisseur",,
|
||||
"Supplier Catalog Lines","Catalogue fournisseur",,
|
||||
"Supplier Comment","Commentaire Fournisseur",,
|
||||
"Supplier RFQ/PO","Fournisseur Devis/Cmde",,
|
||||
"Supplier RFQs/POs","Fournisseur Devis/Cmdes",,
|
||||
"Supplier box in purchase order","Texte à afficher sur les commandes fournisseurs",,
|
||||
"Supplier catalog","Catalogue fournisseur",,
|
||||
"Supplier code","Code fournisseur",,
|
||||
"Supplier invoices","Factures fournisseur",,
|
||||
"Supplier is required to generate a purchase order.","Un fournisseur doit être renseigné pour générer une commande d'achat",,
|
||||
"Supplier ref.","Réf. Fournisseur",,
|
||||
"Suppliers","Fournisseurs",,
|
||||
"Suppliers Map","Carte géographique",,
|
||||
"Suppliers requests","Demandes de cotation",,
|
||||
"Tax","Taxe",,
|
||||
"Tax Equiv",,,
|
||||
"Tax Lines","Lignes de taxe",,
|
||||
"Team",,,
|
||||
"The company %s doesn't have any configured sequence for the purchase orders","La société %s n'a pas de séquence configurée pour les commandes fournisseur",,
|
||||
"The company is required and must be the same for all purchase orders","La société est requise et doit être la même pour toutes les commandes d'achat",,
|
||||
"The currency is required and must be the same for all purchase orders","La devise est requise et doit être la même pour toutes les commandes d'achat",,
|
||||
"The field 'Stock Location' must be filled.","Le champs ""Emplacement de stock"" doit être rempli",,
|
||||
"The line cannot be null.","La ligne ne peut pas être nul",,
|
||||
"The minimum order quantity of %s to the supplier is not respected.","La quantité minimum de commande de %s auprès du fournisseur n’est pas respectée.",,
|
||||
"The supplier Partner is required and must be the same for all purchase orders","Le fournisseur est requis et doit être le même pour toutes les commandes d'achat",,
|
||||
"The trading name must be the same for all purchase orders",,,
|
||||
"There is no sequence set for the purchase requests for the company %s","Aucune séquence n'est définie pour les demandes d'achats portant sur la société %s",,
|
||||
"This product is not available from the supplier.","Ce produit n’est pas disponible auprès du fournisseur.",,
|
||||
"This supplier is blocked:","Ce fournisseur est bloqué :",,
|
||||
"Timetable","Echéancier",,
|
||||
"Title","Libellé",,
|
||||
"Title Line","Ligne de titre",,
|
||||
"To Date","A",,
|
||||
"Tools","Outils",,
|
||||
"Total A.T.I.","Total T.T.C.",,
|
||||
"Total A.T.I. in company currency","Total TTC Devis Société",,
|
||||
"Total Purchased Amount by month","Montant total Achats par mois",,
|
||||
"Total Purchased Qty by month","Qté totale Achats par mois",,
|
||||
"Total Tax","Total Taxe",,
|
||||
"Total W.T.","Total H.T.",,
|
||||
"Total W.T. in company currency","Total H.T. Devise Sté",,
|
||||
"Total tax",,,
|
||||
"Trading name",,,
|
||||
"Turn Over","Chiffre d'affaire Achat",,
|
||||
"Unit","Unité",,
|
||||
"Unit price","Prix unitaire",,
|
||||
"Unit price A.T.I.","Prix unitaire T.T.C.",,
|
||||
"Unit price W.T.","Prix unitaire H.T.",,
|
||||
"Unit price discounted","Prix unitaire remisé",,
|
||||
"Units","Unités",,
|
||||
"Update lines with selected project","Lier toutes les lignes au projet sélectionné",,
|
||||
"Validate","Valider",,
|
||||
"Validated","Validé(e)",,
|
||||
"Validated by","Validé par",,
|
||||
"Validation date","Date de validation",,
|
||||
"Version Number","Numéro de la version",,
|
||||
"WT",,,
|
||||
"Warning, a completed order can't be changed anymore, do you want to continue?","Attention, une commande terminée ne peut plus être modifiée. Voulez-vous continuer ?",,
|
||||
"You have to choose at least one purchase order","Vous devez choisir au moins une commande fournisseur",,
|
||||
"You must configure Purchase module for the company %s","Vous devez configurer le module Achats pour la société %s",,
|
||||
"You need a purchase order associated to line.","Vous avez besoin d'une commande associée à ligne",,
|
||||
"important",,,
|
||||
"info",,,
|
||||
"success",,,
|
||||
"value:Purchase","Achats",,
|
||||
"value:Purchase Request","Demandes d'achat",,
|
||||
"warning",,,
|
||||
"{{ company.name }}",,,
|
||||
"{{ stockLocation.name }}",,,
|
||||
|
@ -0,0 +1,344 @@
|
||||
"key","message","comment","context"
|
||||
"50 Latest Supplier Orders","50 Ultimi ordini dei fornitori",,
|
||||
"A tax line is missing","Manca una linea d'imposta",,
|
||||
"ABC analysis",,,
|
||||
"ATI","ATI",,
|
||||
"AbcAnalysis.endDate",,,
|
||||
"AbcAnalysis.startDate",,,
|
||||
"Accept","Accettare",,
|
||||
"Accept and generate PO","Accettare e generare PO",,
|
||||
"Accepted","Accettati",,
|
||||
"Actions","Azioni",,
|
||||
"Add","Aggiungi",,
|
||||
"All requests accepted","Tutte le richieste accettate",,
|
||||
"All requests sent","Tutte le richieste inviate",,
|
||||
"Amount","Importo",,
|
||||
"Amount A.T.I.","Importo A.T.I.",,
|
||||
"Amount Tax",,,
|
||||
"Amount invoiced W.T.","Importo fatturato W.T.",,
|
||||
"Amount to be spread over the timetable","Importo da ripartire sull'orario",,
|
||||
"Analytic distribution",,,
|
||||
"Analytic distribution required on purchase order line",,,
|
||||
"Analytics","Analisi",,
|
||||
"App purchase","Acquisto App",,
|
||||
"Apply to all","Applicare a tutti",,
|
||||
"Attributes","Attributi",,
|
||||
"Base W.T.","Base W.T.",,
|
||||
"Budget","Bilancio",,
|
||||
"Budget distribution","Distribuzione del bilancio",,
|
||||
"Business Project","Progetto d'affari",,
|
||||
"Business project","Progetto imprenditoriale",,
|
||||
"Buyer","Acquirente",,
|
||||
"Calculated price/Qty","Calcolato il prezzo/quantità",,
|
||||
"Cancel","Annulla",,
|
||||
"Cancel receipt","Annullare la ricevuta",,
|
||||
"Canceled","Annullato",,
|
||||
"Characteristics","Caratteristiche",,
|
||||
"Closed Purchase orders","Ordini d'acquisto chiusi",,
|
||||
"Code",,,
|
||||
"Company","L'azienda",,
|
||||
"Company bank","Banca aziendale",,
|
||||
"Configuration","Configurazione",,
|
||||
"Confirm","Conferma",,
|
||||
"Confirm my cart","Conferma il mio carrello",,
|
||||
"Confirmation","Conferma",,
|
||||
"Contact","Contatto",,
|
||||
"Contact partner","Contatto",,
|
||||
"Contacts","Contatti",,
|
||||
"Content","Contenuto",,
|
||||
"Currency","Valuta",,
|
||||
"Current Purchase orders","Ordini d'acquisto in corso",,
|
||||
"Custom field","Campo personalizzato",,
|
||||
"Custom fields","Campi personalizzati",,
|
||||
"Dashboard","Cruscotto",,
|
||||
"Dates","Le date",,
|
||||
"Deliver","Consegna",,
|
||||
"Deliver Partially","Consegnare parzialmente",,
|
||||
"Delivery","Consegna",,
|
||||
"Description","Descrizione",,
|
||||
"Description To Display","Descrizione Da visualizzare",,
|
||||
"Desired receipt date",,,
|
||||
"Discount Type","Tipo di sconto",,
|
||||
"Discount amount","Importo dello sconto",,
|
||||
"Discount rate","Tasso di sconto",,
|
||||
"Display buyer on printing","Mostra acquirente sulla stampa",,
|
||||
"Display price on requested purchase printing","Visualizza il prezzo sulla stampa d'acquisto richiesta",,
|
||||
"Display product code on printing","Visualizzazione del codice prodotto in stampa",,
|
||||
"Display product detail on printing","Visualizzare i dettagli del prodotto sulla stampa",,
|
||||
"Display purchase order line number",,,
|
||||
"Display supplier code on printing",,,
|
||||
"Display tax detail on printing","Visualizzare il dettaglio delle tasse sulla stampa",,
|
||||
"Displayed Product name","Visualizzazione del nome del prodotto",,
|
||||
"Draft","Bozza",,
|
||||
"Enable product description copy","Abilita la copia della descrizione del prodotto",,
|
||||
"End date",,,
|
||||
"Estim. receipt date",,,
|
||||
"Estimated delivery Date","Data di consegna prevista",,
|
||||
"Filter on supplier","Filtro sul fornitore",,
|
||||
"Finish the order","Termina l'ordine",,
|
||||
"Finished","Finito",,
|
||||
"Fixed Assets","Immobilizzazioni",,
|
||||
"Follow-up","Seguito",,
|
||||
"From Date","Da Data",,
|
||||
"Full name","Nome e cognome",,
|
||||
"Generate PO","Generare PO",,
|
||||
"Generate control invoice","Genera fattura di controllo",,
|
||||
"Generate purchase configurations","Generare configurazioni di acquisto",,
|
||||
"Generate supplier arrival","Generare l'arrivo del fornitore",,
|
||||
"Generate suppliers requests","Generare le richieste dei fornitori",,
|
||||
"Group by product","Gruppo per prodotto",,
|
||||
"Group by supplier","Gruppo per fornitore",,
|
||||
"Historical","Storico",,
|
||||
"Historical Period","Periodo Storico",,
|
||||
"In ATI","In ATI",,
|
||||
"In Stock Moves","In stock si muove",,
|
||||
"Information","Informazioni",,
|
||||
"Internal Note","Nota interna",,
|
||||
"Internal Ref.","Rif. interno",,
|
||||
"Internal note","Nota interna",,
|
||||
"Internal purchase requests",,,
|
||||
"Invoice Lines","Linee di fatturazione",,
|
||||
"Invoiced","Fatturato",,
|
||||
"Invoices","Fatture",,
|
||||
"Invoicing","Fatturazione",,
|
||||
"Last update","Ultimo aggiornamento",,
|
||||
"Manage multiple purchase quantity","Gestire quantità di acquisto multiple",,
|
||||
"Manage purchase order versions","Gestire le versioni degli ordini di acquisto",,
|
||||
"Manage purchases unit on products","Gestire l'unità acquisti sui prodotti",,
|
||||
"Manage supplier catalog","Gestire il catalogo dei fornitori",,
|
||||
"Merge into single purchase order","Unire in un unico ordine di acquisto",,
|
||||
"Merge purchase orders","Unire gli ordini di acquisto",,
|
||||
"Merge quotations","Unire le quotazioni",,
|
||||
"Message for requesting prices","Messaggio di richiesta prezzi",,
|
||||
"Min sale price","Prezzo minimo di vendita",,
|
||||
"Month","Mese",,
|
||||
"My Closed Purchase orders","I miei ordini di acquisto chiusi",,
|
||||
"My Ongoing Purchase orders","I miei ordini di acquisto in corso",,
|
||||
"My Orders to process","I miei ordini da elaborare",,
|
||||
"My Purchase orders","I miei ordini di acquisto",,
|
||||
"My Purchase request","La mia richiesta d'acquisto",,
|
||||
"My RFQs","Le mie RFQ",,
|
||||
"My RFQs and POs To Validate (Requested & Received)","Le mie RFQ e PO da convalidare (richieste e ricevute)",,
|
||||
"My Sales","Le mie vendite",,
|
||||
"My Validated POs","Le mie OP convalidate",,
|
||||
"My purchased amount by product accounting family",,,
|
||||
"My purchased qty by product accounting family",,,
|
||||
"Name","Nome",,
|
||||
"Nbr of PO by month","Numero di PO per mese",,
|
||||
"New product","Nuovo prodotto",,
|
||||
"New version","Nuova versione",,
|
||||
"Not invoiced","Non fatturata",,
|
||||
"Not received","Non ricevuto",,
|
||||
"OR","OPPURE",,
|
||||
"Ongoing Purchase orders","Ordini d'acquisto in corso",,
|
||||
"Order Date","Data dell'ordine",,
|
||||
"Ordered","Ordinato",,
|
||||
"Overview","Panoramica",,
|
||||
"PO Management","Gestione delle OP",,
|
||||
"PO Tax line","Linea d'imposta PO",,
|
||||
"PO Tax lines","PO Linee d'imposta",,
|
||||
"PO line","Linea PO",,
|
||||
"PO lines","Linee PO",,
|
||||
"PO lines detail","Dettaglio",,
|
||||
"POs Volume by buyer by accounting family",,,
|
||||
"Partial delivery","Consegna parziale",,
|
||||
"Partially invoiced","Parzialmente fatturata",,
|
||||
"Partially received","Parzialmente ricevuto",,
|
||||
"Partner price lists","Listini prezzi partner",,
|
||||
"Percent","Percentuale",,
|
||||
"Please enter at least one detail line.",,,
|
||||
"Please enter supplier for following purchase request : %s",,,
|
||||
"Please fill printing settings on following purchase orders: %s","Si prega di compilare le impostazioni di stampa per i seguenti ordini di acquisto: %s",,
|
||||
"Please fill printing settings on purchase order %s","Si prega di compilare le impostazioni di stampa sull'ordine di acquisto %s",,
|
||||
"Please select the purchase order(s) to print.","Selezionare l'ordine o gli ordini di acquisto da stampare.",,
|
||||
"Price List","Listino prezzi",,
|
||||
"Price list","Listino prezzi",,
|
||||
"Price lists","Listini prezzi",,
|
||||
"Print","Stampa",,
|
||||
"Printing","Stampa",,
|
||||
"Printing settings","Impostazioni di stampa",,
|
||||
"Product","Prodotto",,
|
||||
"Product Accounting Family",,,
|
||||
"Product code on catalog","Codice prodotto a catalogo",,
|
||||
"Product name on catalog","Nome prodotto a catalogo",,
|
||||
"Products & services","Prodotti e servizi",,
|
||||
"Products list","Elenco prodotti",,
|
||||
"Purchase","Acquisto",,
|
||||
"Purchase Buyer","Acquirente",,
|
||||
"Purchase Manager","Responsabile acquisti",,
|
||||
"Purchase blocking","Blocco degli acquisti",,
|
||||
"Purchase config","Configurazione dell'acquisto",,
|
||||
"Purchase config (${ name })","Configurazione di acquisto (${ nome })",,
|
||||
"Purchase configuration","Configurazione d'acquisto",,
|
||||
"Purchase configurations","Configurazioni di acquisto",,
|
||||
"Purchase order","Ordine d'acquisto",,
|
||||
"Purchase order created","Ordine di acquisto creato",,
|
||||
"Purchase order information","Informazioni sull'ordine di acquisto",,
|
||||
"Purchase orders","Ordini d'acquisto",,
|
||||
"Purchase orders ATI/WT","Ordini d'acquisto ATI/WT",,
|
||||
"Purchase orders Details","Dettagli",,
|
||||
"Purchase orders to merge","Ordini d'acquisto da fondere",,
|
||||
"Purchase quotations","Preventivi d'acquisto",,
|
||||
"Purchase request","Richiesta d'acquisto",,
|
||||
"Purchase request creator","Creatore di richiesta d'acquisto",,
|
||||
"PurchaseOrder.afterDiscount","dopo uno sconto di",,
|
||||
"PurchaseOrder.base","Base",,
|
||||
"PurchaseOrder.buyer","Acquirente",,
|
||||
"PurchaseOrder.buyerEmail",,,
|
||||
"PurchaseOrder.buyerPhone",,,
|
||||
"PurchaseOrder.canceled","Annullato",,
|
||||
"PurchaseOrder.customer","Cliente",,
|
||||
"PurchaseOrder.customerRef","Riferimento del cliente",,
|
||||
"PurchaseOrder.deliveryAddress","Indirizzo di consegna",,
|
||||
"PurchaseOrder.deliveryDate","Data di consegna",,
|
||||
"PurchaseOrder.description","Descrizione",,
|
||||
"PurchaseOrder.desiredDelivDate","Data di consegna desiderata",,
|
||||
"PurchaseOrder.discountAmount","Sconto",,
|
||||
"PurchaseOrder.draft","Bozza",,
|
||||
"PurchaseOrder.finished","Finito",,
|
||||
"PurchaseOrder.invoicingAddress","Indirizzo di fatturazione",,
|
||||
"PurchaseOrder.note","Nota",,
|
||||
"PurchaseOrder.order","Ordine",,
|
||||
"PurchaseOrder.orderDate","Data dell'ordine",,
|
||||
"PurchaseOrder.paymentCondition","Condizioni di pagamento",,
|
||||
"PurchaseOrder.paymentMode","Modalità di pagamento",,
|
||||
"PurchaseOrder.priceExclTax","Importo IVA esclusa",,
|
||||
"PurchaseOrder.priceInclTax","Importo Incl. Tasse",,
|
||||
"PurchaseOrder.productSequence",,,
|
||||
"PurchaseOrder.productStandard",,,
|
||||
"PurchaseOrder.purchaseInfo","Informazioni sull'acquisto.",,
|
||||
"PurchaseOrder.qtyUnit","Quantità",,
|
||||
"PurchaseOrder.quote","RFQ",,
|
||||
"PurchaseOrder.ref","Riferimento",,
|
||||
"PurchaseOrder.reference","Riferimento",,
|
||||
"PurchaseOrder.requested","Richiesto",,
|
||||
"PurchaseOrder.state","Stato",,
|
||||
"PurchaseOrder.statusCanceled","Ordine di acquisto annullato",,
|
||||
"PurchaseOrder.statusDraft","Progetto d'ordine d'acquisto",,
|
||||
"PurchaseOrder.statusFinished","Ordine di acquisto finito",,
|
||||
"PurchaseOrder.statusRequested","Ordine di acquisto richiesto",,
|
||||
"PurchaseOrder.statusValidated","Ordine di acquisto convalidato",,
|
||||
"PurchaseOrder.supplier","Fornitore",,
|
||||
"PurchaseOrder.supplierCode","Supplier code",,
|
||||
"PurchaseOrder.supplyRef","Riferimento del fornitore",,
|
||||
"PurchaseOrder.tax","Tassa di soggiorno",,
|
||||
"PurchaseOrder.taxAmount","Imposta Importo",,
|
||||
"PurchaseOrder.totalDiscount","Sconto",,
|
||||
"PurchaseOrder.totalExclTax","Totale IVA esclusa",,
|
||||
"PurchaseOrder.totalExclTaxWithoutDiscount","Totale lordo al netto delle imposte",,
|
||||
"PurchaseOrder.totalInclTax","Total Inc. Tassa di soggiorno",,
|
||||
"PurchaseOrder.totalTax","Totale imposte",,
|
||||
"PurchaseOrder.unitPrice","Prezzo unitario",,
|
||||
"PurchaseOrder.validated","Convalidato",,
|
||||
"Purchased","Acquistato",,
|
||||
"Purchased amount by accounting family",,,
|
||||
"Purchased amount by product accounting family",,,
|
||||
"Purchased amount distribution by accounting family",,,
|
||||
"Purchases","Acquisti",,
|
||||
"Purchases Order filters","Acquisti Ordine filtri",,
|
||||
"Purchases follow-up","Controllo degli acquisti",,
|
||||
"Purchases unit","Unità di acquisto",,
|
||||
"Qty","Qtà",,
|
||||
"Quantity","Quantità",,
|
||||
"Quantity min","Quantità min",,
|
||||
"Quotation","Preventivo",,
|
||||
"RFQ And PO To Validate","RFQ e PO da convalidare",,
|
||||
"Receipt State","Stato di ricezione",,
|
||||
"Received","Ricevuto",,
|
||||
"Received quantity","Quantità ricevuta",,
|
||||
"Ref.","Rif.",,
|
||||
"Reference already existing","Riferimento già esistente",,
|
||||
"References","Riferimenti",,
|
||||
"Refuse","Rifiutare",,
|
||||
"Refused","Rifiutato",,
|
||||
"Reportings","Rapporti",,
|
||||
"Reports","Rapporti",,
|
||||
"Request","Richiesta",,
|
||||
"Requested","Richiesto",,
|
||||
"Reverse charged","Carica inversa",,
|
||||
"Sale orders","Ordini di vendita",,
|
||||
"Sale price","Prezzo di vendita",,
|
||||
"Sale quotations","Preventivi di vendita",,
|
||||
"See budget distribution lines",,,
|
||||
"See purchase order lines","Vedi le righe dell'ordine di acquisto",,
|
||||
"See purchase orders lines",,,
|
||||
"See quotation lines","Vedi righe di citazione",,
|
||||
"Send Email","Invia e-mail",,
|
||||
"Send email","Invia e-mail",,
|
||||
"Seq.","Seq.",,
|
||||
"Shipping Coefficients","Coefficienti di spedizione",,
|
||||
"Show invoice","Mostra fattura",,
|
||||
"Start date",,,
|
||||
"Status","Stato",,
|
||||
"Stock location","Ubicazione delle scorte",,
|
||||
"Stock move","Spostamento delle scorte",,
|
||||
"Supplier","Fornitore",,
|
||||
"Supplier Catalog","Catalogo dei fornitori",,
|
||||
"Supplier Catalog Lines","Linee catalogo fornitori",,
|
||||
"Supplier Comment","Commento del fornitore",,
|
||||
"Supplier RFQ/PO","Fornitore RFQ/PO",,
|
||||
"Supplier RFQs/POs","Fornitore RFQs/POs",,
|
||||
"Supplier box in purchase order","Box fornitore in ordine d'acquisto",,
|
||||
"Supplier catalog","Catalogo dei fornitori",,
|
||||
"Supplier code",,,
|
||||
"Supplier invoices","Fatture dei fornitori",,
|
||||
"Supplier is required to generate a purchase order.",,,
|
||||
"Supplier ref.","Rif. fornitore",,
|
||||
"Suppliers","Fornitori",,
|
||||
"Suppliers Map","Mappa Fornitori",,
|
||||
"Suppliers requests","Richieste dei fornitori",,
|
||||
"Tax","Tassa di soggiorno",,
|
||||
"Tax Equiv","Equiv fiscale",,
|
||||
"Tax Lines","Linee fiscali",,
|
||||
"Team","Squadra",,
|
||||
"The company %s doesn't have any configured sequence for the purchase orders","L'azienda %s non ha alcuna sequenza configurata per gli ordini di acquisto",,
|
||||
"The company is required and must be the same for all purchase orders","L'azienda è richiesta e deve essere la stessa per tutti gli ordini di acquisto",,
|
||||
"The currency is required and must be the same for all purchase orders","La valuta è richiesta e deve essere la stessa per tutti gli ordini di acquisto",,
|
||||
"The field 'Stock Location' must be filled.","Il campo Magazzino deve essere compilato.",,
|
||||
"The line cannot be null.","La linea non può essere nulla.",,
|
||||
"The minimum order quantity of %s to the supplier is not respected.","La quantità minima d'ordine al fornitore non viene rispettata.",,
|
||||
"The supplier Partner is required and must be the same for all purchase orders","Il fornitore Partner è richiesto e deve essere lo stesso per tutti gli ordini di acquisto",,
|
||||
"The trading name must be the same for all purchase orders","Il nome commerciale deve essere lo stesso per tutti gli ordini di acquisto",,
|
||||
"There is no sequence set for the purchase requests for the company %s",,,
|
||||
"This product is not available from the supplier.","Questo prodotto non è disponibile presso il fornitore.",,
|
||||
"This supplier is blocked:","Questo fornitore è bloccato:",,
|
||||
"Timetable","Orario",,
|
||||
"Title","Titolo",,
|
||||
"Title Line","Linea del titolo",,
|
||||
"To Date","Fino ad oggi",,
|
||||
"Tools","Strumenti",,
|
||||
"Total A.T.I.","Totale A.T.I.T.T.I.",,
|
||||
"Total A.T.I. in company currency","Totale A.T.I.T.I. in valuta aziendale",,
|
||||
"Total Purchased Amount by month","Totale Acquisti Importo acquistato per mese",,
|
||||
"Total Purchased Qty by month","Qtà totale acquistata per mese",,
|
||||
"Total Tax","Totale imposte",,
|
||||
"Total W.T.","Totale W.T.",,
|
||||
"Total W.T. in company currency","Totale W.T. in valuta aziendale",,
|
||||
"Total tax","Totale imposte",,
|
||||
"Trading name","Nome commerciale",,
|
||||
"Turn Over","Girare",,
|
||||
"Unit","Unità",,
|
||||
"Unit price","Prezzo unitario",,
|
||||
"Unit price A.T.I.","Prezzo unitario A.T.I.",,
|
||||
"Unit price W.T.","Prezzo unitario W.T.",,
|
||||
"Unit price discounted","Prezzo unitario scontato",,
|
||||
"Units","Unità",,
|
||||
"Update lines with selected project","Aggiornare le linee con il progetto selezionato",,
|
||||
"Validate","Convalida",,
|
||||
"Validated","Convalidato",,
|
||||
"Validated by","Convalidato da",,
|
||||
"Validation date","Data di convalida",,
|
||||
"Version Number","Numero di versione",,
|
||||
"WT","WT",,
|
||||
"Warning, a completed order can't be changed anymore, do you want to continue?","Attenzione, un ordine completato non puo' piu' essere cambiato, vuoi continuare?",,
|
||||
"You have to choose at least one purchase order","Devi scegliere almeno un ordine di acquisto",,
|
||||
"You must configure Purchase module for the company %s","È necessario configurare il modulo di acquisto per l'azienda %s",,
|
||||
"You need a purchase order associated to line.","Hai bisogno di un ordine di acquisto associato alla linea.",,
|
||||
"important","importante",,
|
||||
"info","Info",,
|
||||
"success","riuscita",,
|
||||
"value:Purchase","valore:Acquisto",,
|
||||
"value:Purchase Request","valore:Richiesta di acquisto",,
|
||||
"warning","ammonimento",,
|
||||
"{{ company.name }}","{{ company.name }}",,
|
||||
"{{ stockLocation.name }}","{{ stockLocation.name }}",,
|
||||
|
@ -0,0 +1,344 @@
|
||||
"key","message","comment","context"
|
||||
"50 Latest Supplier Orders","50 Laatste bestellingen van leveranciers",,
|
||||
"A tax line is missing","Er ontbreekt een fiscale lijn",,
|
||||
"ABC analysis",,,
|
||||
"ATI","ATI",,
|
||||
"AbcAnalysis.endDate",,,
|
||||
"AbcAnalysis.startDate",,,
|
||||
"Accept","Keur goed",,
|
||||
"Accept and generate PO","Accepteer en genereer PO",,
|
||||
"Accepted","Aanvaard",,
|
||||
"Actions","Acties",,
|
||||
"Add","Toevoegen",,
|
||||
"All requests accepted","Alle aanvragen worden geaccepteerd",,
|
||||
"All requests sent","Alle verzoeken verzonden",,
|
||||
"Amount","Bedrag",,
|
||||
"Amount A.T.I.","Bedrag A.T.I.",,
|
||||
"Amount Tax",,,
|
||||
"Amount invoiced W.T.","Bedrag gefactureerd W.T.",,
|
||||
"Amount to be spread over the timetable","Bedrag te verdelen over de dienstregeling",,
|
||||
"Analytic distribution",,,
|
||||
"Analytic distribution required on purchase order line",,,
|
||||
"Analytics","Analytics",,
|
||||
"App purchase","Aankoop van een app",,
|
||||
"Apply to all","Van toepassing op alle",,
|
||||
"Attributes","Attributen",,
|
||||
"Base W.T.","Basis W.T.",,
|
||||
"Budget","Begroting",,
|
||||
"Budget distribution","Verdeling van het budget",,
|
||||
"Business Project","Bedrijfsproject",,
|
||||
"Business project","Bedrijfsproject",,
|
||||
"Buyer","Koper",,
|
||||
"Calculated price/Qty","Berekende prijs/Qty",,
|
||||
"Cancel","Annuleren",,
|
||||
"Cancel receipt","Ontvangstbewijs annuleren",,
|
||||
"Canceled","Geannuleerd",,
|
||||
"Characteristics","Kenmerken",,
|
||||
"Closed Purchase orders","Gesloten Inkooporders",,
|
||||
"Code",,,
|
||||
"Company","Bedrijf",,
|
||||
"Company bank","Bedrijfsbank",,
|
||||
"Configuration","Configuratie",,
|
||||
"Confirm","Bevestigen",,
|
||||
"Confirm my cart","Mijn winkelwagen bevestigen",,
|
||||
"Confirmation","Bevestiging",,
|
||||
"Contact","Contact",,
|
||||
"Contact partner","Contactpersoon",,
|
||||
"Contacts","Contacten",,
|
||||
"Content","Inhoud",,
|
||||
"Currency","Valuta",,
|
||||
"Current Purchase orders","Lopende inkooporders",,
|
||||
"Custom field","Aangepast veld",,
|
||||
"Custom fields","Aangepaste velden",,
|
||||
"Dashboard","Dashboard",,
|
||||
"Dates","Data",,
|
||||
"Deliver","Leveren",,
|
||||
"Deliver Partially","Gedeeltelijk leveren",,
|
||||
"Delivery","Levering",,
|
||||
"Description","Beschrijving",,
|
||||
"Description To Display","Beschrijving Om weer te geven",,
|
||||
"Desired receipt date",,,
|
||||
"Discount Type","Type korting",,
|
||||
"Discount amount","Korting bedrag",,
|
||||
"Discount rate","Disconteringsvoet",,
|
||||
"Display buyer on printing","Vertoningskoper op druk",,
|
||||
"Display price on requested purchase printing","Weergave prijs op de gevraagde aankoop afdrukken",,
|
||||
"Display product code on printing","Toon productcode op afdrukken",,
|
||||
"Display product detail on printing","Productdetails weergeven bij het afdrukken",,
|
||||
"Display purchase order line number",,,
|
||||
"Display supplier code on printing",,,
|
||||
"Display tax detail on printing","Belastingdetails bij het afdrukken weergeven",,
|
||||
"Displayed Product name","Weergegeven productnaam",,
|
||||
"Draft","Ontwerp",,
|
||||
"Enable product description copy","Productbeschrijvingskopie inschakelen",,
|
||||
"End date",,,
|
||||
"Estim. receipt date",,,
|
||||
"Estimated delivery Date","Geschatte leverdatum",,
|
||||
"Filter on supplier","Filter op leverancier",,
|
||||
"Finish the order","Voltooi de bestelling",,
|
||||
"Finished","Afgewerkt",,
|
||||
"Fixed Assets","Vaste activa",,
|
||||
"Follow-up","Follow-up",,
|
||||
"From Date","Vanaf datum",,
|
||||
"Full name","Volledige naam",,
|
||||
"Generate PO","PO genereren",,
|
||||
"Generate control invoice","Genereer een controlefactuur",,
|
||||
"Generate purchase configurations","Aankoopconfiguraties genereren",,
|
||||
"Generate supplier arrival","Genereer leveranciersaankomst",,
|
||||
"Generate suppliers requests","Genereer verzoeken van leveranciers",,
|
||||
"Group by product","Groep per product",,
|
||||
"Group by supplier","Groep per leverancier",,
|
||||
"Historical","Historisch",,
|
||||
"Historical Period","Historische periode",,
|
||||
"In ATI","In ATI",,
|
||||
"In Stock Moves","Op voorraad Verhuizingen",,
|
||||
"Information","Informatie",,
|
||||
"Internal Note","Interne nota",,
|
||||
"Internal Ref.","Intern Ref.",,
|
||||
"Internal note","Interne nota",,
|
||||
"Internal purchase requests",,,
|
||||
"Invoice Lines","Factuurlijnen",,
|
||||
"Invoiced","Gefactureerd",,
|
||||
"Invoices","Facturen",,
|
||||
"Invoicing","Facturatie",,
|
||||
"Last update","Laatste update",,
|
||||
"Manage multiple purchase quantity","Beheer meerdere aankoophoeveelheden",,
|
||||
"Manage purchase order versions","Aankooporderversies beheren",,
|
||||
"Manage purchases unit on products","Beheer van aankopen op producten",,
|
||||
"Manage supplier catalog","Beheer leverancierscatalogus",,
|
||||
"Merge into single purchase order","Samenvoegen tot één aankooporder",,
|
||||
"Merge purchase orders","Inkooporders samenvoegen",,
|
||||
"Merge quotations","Citaten samenvoegen",,
|
||||
"Message for requesting prices","Bericht voor het aanvragen van prijzen",,
|
||||
"Min sale price","Min. verkoopprijs",,
|
||||
"Month","Maand",,
|
||||
"My Closed Purchase orders","Mijn gesloten inkooporders",,
|
||||
"My Ongoing Purchase orders","Mijn lopende bestellingen",,
|
||||
"My Orders to process","Mijn bestellingen te verwerken",,
|
||||
"My Purchase orders","Mijn inkooporders",,
|
||||
"My Purchase request","Mijn Aankoopverzoek",,
|
||||
"My RFQs","Mijn RFQ's",,
|
||||
"My RFQs and POs To Validate (Requested & Received)","Mijn RFQ's en PO's te valideren (aangevraagd en ontvangen)",,
|
||||
"My Sales","Mijn Verkoop",,
|
||||
"My Validated POs","Mijn gevalideerde PO's",,
|
||||
"My purchased amount by product accounting family",,,
|
||||
"My purchased qty by product accounting family",,,
|
||||
"Name","Naam",,
|
||||
"Nbr of PO by month","Nbr van PO per maand",,
|
||||
"New product","Nieuw product",,
|
||||
"New version","Nieuwe versie",,
|
||||
"Not invoiced","Niet gefactureerd",,
|
||||
"Not received","Niet ontvangen",,
|
||||
"OR","OF",,
|
||||
"Ongoing Purchase orders","Lopende inkooporders",,
|
||||
"Order Date","Datum van bestelling",,
|
||||
"Ordered","Besteld",,
|
||||
"Overview","Overzicht",,
|
||||
"PO Management","PO-beheer",,
|
||||
"PO Tax line","PO Belastinglijn",,
|
||||
"PO Tax lines","PO Belastinglijnen",,
|
||||
"PO line","PO-lijn",,
|
||||
"PO lines","PO lijnen",,
|
||||
"PO lines detail","Detail",,
|
||||
"POs Volume by buyer by accounting family",,,
|
||||
"Partial delivery","Gedeeltelijke levering",,
|
||||
"Partially invoiced","Gedeeltelijk gefactureerd",,
|
||||
"Partially received","Gedeeltelijk ontvangen",,
|
||||
"Partner price lists","Prijslijsten voor partners",,
|
||||
"Percent","Percentage",,
|
||||
"Please enter at least one detail line.",,,
|
||||
"Please enter supplier for following purchase request : %s",,,
|
||||
"Please fill printing settings on following purchase orders: %s","Vul de afdrukinstellingen in op de volgende inkooporders: %s",,
|
||||
"Please fill printing settings on purchase order %s","Gelieve de afdrukinstellingen op de aankooporder in te vullen %s",,
|
||||
"Please select the purchase order(s) to print.","Selecteer de aankooporder(s) om af te drukken.",,
|
||||
"Price List","Prijslijst",,
|
||||
"Price list","Prijslijst",,
|
||||
"Price lists","Prijslijsten",,
|
||||
"Print","Afdrukken",,
|
||||
"Printing","Afdrukken",,
|
||||
"Printing settings","Afdrukinstellingen",,
|
||||
"Product","Product",,
|
||||
"Product Accounting Family",,,
|
||||
"Product code on catalog","Productcode in de catalogus",,
|
||||
"Product name on catalog","Productnaam op catalogus",,
|
||||
"Products & services","Producten & diensten",,
|
||||
"Products list","Productenlijst",,
|
||||
"Purchase","Aankoop",,
|
||||
"Purchase Buyer","Koper kopen",,
|
||||
"Purchase Manager","Inkoopmanager",,
|
||||
"Purchase blocking","Blokkeren van de aankoop",,
|
||||
"Purchase config","Configuratie kopen",,
|
||||
"Purchase config (${ name })","Configuratie kopen (${naam })",,
|
||||
"Purchase configuration","Aankoop configuratie",,
|
||||
"Purchase configurations","Aankoopconfiguraties",,
|
||||
"Purchase order","Aankooporder",,
|
||||
"Purchase order created","Aankooporder aangemaakt",,
|
||||
"Purchase order information","Bestelinformatie",,
|
||||
"Purchase orders","Inkooporders",,
|
||||
"Purchase orders ATI/WT","Aankooporders ATI/WT",,
|
||||
"Purchase orders Details","Inkooporders Details",,
|
||||
"Purchase orders to merge","Aankooporders om samen te voegen",,
|
||||
"Purchase quotations","Aankoopoffertes",,
|
||||
"Purchase request","Aankoop aanvraag",,
|
||||
"Purchase request creator","Aankoop aanvraag maker",,
|
||||
"PurchaseOrder.afterDiscount","na een korting van",,
|
||||
"PurchaseOrder.base","Basis",,
|
||||
"PurchaseOrder.buyer","Koper",,
|
||||
"PurchaseOrder.buyerEmail",,,
|
||||
"PurchaseOrder.buyerPhone",,,
|
||||
"PurchaseOrder.canceled","Geannuleerd",,
|
||||
"PurchaseOrder.customer","Klant",,
|
||||
"PurchaseOrder.customerRef","Klantreferentie",,
|
||||
"PurchaseOrder.deliveryAddress","Leveringsadres",,
|
||||
"PurchaseOrder.deliveryDate","Leveringsdatum",,
|
||||
"PurchaseOrder.description","Beschrijving",,
|
||||
"PurchaseOrder.desiredDelivDate","Gewenste leverdatum",,
|
||||
"PurchaseOrder.discountAmount","Korting",,
|
||||
"PurchaseOrder.draft","Ontwerp",,
|
||||
"PurchaseOrder.finished","Afgewerkt",,
|
||||
"PurchaseOrder.invoicingAddress","Facturatie adres",,
|
||||
"PurchaseOrder.note","Opmerking",,
|
||||
"PurchaseOrder.order","Bestellen",,
|
||||
"PurchaseOrder.orderDate","Datum van bestelling",,
|
||||
"PurchaseOrder.paymentCondition","Betaling Voorwaarde",,
|
||||
"PurchaseOrder.paymentMode","Betaalwijze",,
|
||||
"PurchaseOrder.priceExclTax","Bedrag excl. belastingen",,
|
||||
"PurchaseOrder.priceInclTax","Bedrag incl. belasting",,
|
||||
"PurchaseOrder.productSequence",,,
|
||||
"PurchaseOrder.productStandard",,,
|
||||
"PurchaseOrder.purchaseInfo","Aankoop info.",,
|
||||
"PurchaseOrder.qtyUnit","Hoeveelheid",,
|
||||
"PurchaseOrder.quote","RFQ",,
|
||||
"PurchaseOrder.ref","Referentie",,
|
||||
"PurchaseOrder.reference","Referentie",,
|
||||
"PurchaseOrder.requested","Gevraagd",,
|
||||
"PurchaseOrder.state","Status",,
|
||||
"PurchaseOrder.statusCanceled","Aankooporder geannuleerd",,
|
||||
"PurchaseOrder.statusDraft","Aankooporder ontwerp",,
|
||||
"PurchaseOrder.statusFinished","Aankooporder voltooid",,
|
||||
"PurchaseOrder.statusRequested","Aankooporder aangevraagd",,
|
||||
"PurchaseOrder.statusValidated","Aankooporder gevalideerd",,
|
||||
"PurchaseOrder.supplier","Leverancier",,
|
||||
"PurchaseOrder.supplierCode","Supplier code",,
|
||||
"PurchaseOrder.supplyRef","Referentie leverancier",,
|
||||
"PurchaseOrder.tax","Belasting",,
|
||||
"PurchaseOrder.taxAmount","Belasting Bedrag",,
|
||||
"PurchaseOrder.totalDiscount","Korting",,
|
||||
"PurchaseOrder.totalExclTax","Totaal excl. belastingen",,
|
||||
"PurchaseOrder.totalExclTaxWithoutDiscount","Totaal bruto excl. belastingen",,
|
||||
"PurchaseOrder.totalInclTax","Totaal Inc. Belasting",,
|
||||
"PurchaseOrder.totalTax","Totaal Belastingen",,
|
||||
"PurchaseOrder.unitPrice","Eenheidsprijs",,
|
||||
"PurchaseOrder.validated","Gevalideerd",,
|
||||
"Purchased","Gekocht",,
|
||||
"Purchased amount by accounting family",,,
|
||||
"Purchased amount by product accounting family",,,
|
||||
"Purchased amount distribution by accounting family",,,
|
||||
"Purchases","Aankopen",,
|
||||
"Purchases Order filters","Aankoop Bestelfilters",,
|
||||
"Purchases follow-up","Follow-up van de aankopen",,
|
||||
"Purchases unit","Aankopen eenheid",,
|
||||
"Qty","Qty",,
|
||||
"Quantity","Hoeveelheid",,
|
||||
"Quantity min","Hoeveelheid min.",,
|
||||
"Quotation","Citaat",,
|
||||
"RFQ And PO To Validate","RFQ en PO te valideren",,
|
||||
"Receipt State","Ontvangststaat",,
|
||||
"Received","Ontvangen",,
|
||||
"Received quantity","Ontvangen hoeveelheid",,
|
||||
"Ref.","Ref.",,
|
||||
"Reference already existing","Reeds bestaande referentie",,
|
||||
"References","Referenties",,
|
||||
"Refuse","Weigeren",,
|
||||
"Refused","Geweigerd",,
|
||||
"Reportings","Meldingen",,
|
||||
"Reports","Rapporten",,
|
||||
"Request","Aanvraag",,
|
||||
"Requested","Gevraagd",,
|
||||
"Reverse charged","Omgekeerd opgeladen",,
|
||||
"Sale orders","Verkooporders",,
|
||||
"Sale price","Verkoopprijs",,
|
||||
"Sale quotations","Verkoopaanbiedingen",,
|
||||
"See budget distribution lines",,,
|
||||
"See purchase order lines","Zie bestelregels",,
|
||||
"See purchase orders lines",,,
|
||||
"See quotation lines","Zie aanhalingstekens",,
|
||||
"Send Email","Verstuur e-mail",,
|
||||
"Send email","Verstuur e-mail",,
|
||||
"Seq.","Seq.",,
|
||||
"Shipping Coefficients","Het verschepen van Coëfficiënten",,
|
||||
"Show invoice","Toon factuur",,
|
||||
"Start date",,,
|
||||
"Status","Status",,
|
||||
"Stock location","Voorraad locatie",,
|
||||
"Stock move","Voorraadverhuizing",,
|
||||
"Supplier","Leverancier",,
|
||||
"Supplier Catalog","Leverancierscatalogus",,
|
||||
"Supplier Catalog Lines","Leverancierscatalogus Lijnen",,
|
||||
"Supplier Comment","Commentaar van de leverancier",,
|
||||
"Supplier RFQ/PO","Leverancier RFQ/PO",,
|
||||
"Supplier RFQs/POs","Leverancier RFQs/PO's",,
|
||||
"Supplier box in purchase order","Leveranciersdoos in inkooporder",,
|
||||
"Supplier catalog","Leverancierscatalogus",,
|
||||
"Supplier code",,,
|
||||
"Supplier invoices","Facturen van leveranciers",,
|
||||
"Supplier is required to generate a purchase order.",,,
|
||||
"Supplier ref.","Leverancier ref.",,
|
||||
"Suppliers","Leveranciers",,
|
||||
"Suppliers Map","Leveranciers Kaart",,
|
||||
"Suppliers requests","Verzoeken van leveranciers",,
|
||||
"Tax","Belasting",,
|
||||
"Tax Equiv","Belastingequivalent",,
|
||||
"Tax Lines","Belastinglijnen",,
|
||||
"Team","Team",,
|
||||
"The company %s doesn't have any configured sequence for the purchase orders","Het bedrijf %s heeft geen enkele geconfigureerde volgorde voor de inkooporders",,
|
||||
"The company is required and must be the same for all purchase orders","Het bedrijf is verplicht en moet hetzelfde zijn voor alle inkooporders",,
|
||||
"The currency is required and must be the same for all purchase orders","De munteenheid is verplicht en moet gelijk zijn voor alle inkooporders",,
|
||||
"The field 'Stock Location' must be filled.","Het veld 'Stock Location' moet worden ingevuld.",,
|
||||
"The line cannot be null.","De lijn kan niet ongeldig zijn.",,
|
||||
"The minimum order quantity of %s to the supplier is not respected.","De minimum bestelhoeveelheid van %s aan de leverancier wordt niet gerespecteerd.",,
|
||||
"The supplier Partner is required and must be the same for all purchase orders","De leverancierspartner is verplicht en moet dezelfde zijn voor alle inkooporders",,
|
||||
"The trading name must be the same for all purchase orders","De handelsnaam moet dezelfde zijn voor alle inkooporders",,
|
||||
"There is no sequence set for the purchase requests for the company %s",,,
|
||||
"This product is not available from the supplier.","Dit product is niet verkrijgbaar bij de leverancier.",,
|
||||
"This supplier is blocked:","Deze leverancier is geblokkeerd:",,
|
||||
"Timetable","Tijdschema",,
|
||||
"Title","Titel",,
|
||||
"Title Line","Titel Lijn",,
|
||||
"To Date","Tot op heden",,
|
||||
"Tools","Gereedschap",,
|
||||
"Total A.T.I.","Totaal A.T.I.",,
|
||||
"Total A.T.I. in company currency","Totaal A.T.I. in bedrijfsvaluta",,
|
||||
"Total Purchased Amount by month","Totaal Aangekocht Bedrag per maand",,
|
||||
"Total Purchased Qty by month","Totaal Gekochte Qty per maand",,
|
||||
"Total Tax","Totaal Belastingen",,
|
||||
"Total W.T.","Totaal W.T.",,
|
||||
"Total W.T. in company currency","Totaal W.T. in bedrijfsvaluta",,
|
||||
"Total tax","Totaal belastingen",,
|
||||
"Trading name","Handelsnaam",,
|
||||
"Turn Over","Omzet",,
|
||||
"Unit","Eenheid",,
|
||||
"Unit price","Eenheidsprijs",,
|
||||
"Unit price A.T.I.","Eenheidsprijs A.T.I.",,
|
||||
"Unit price W.T.","Eenheidsprijs W.T.",,
|
||||
"Unit price discounted","Eenheidsprijs met korting",,
|
||||
"Units","Eenheden",,
|
||||
"Update lines with selected project","Update lijnen met geselecteerd project",,
|
||||
"Validate","Valideren",,
|
||||
"Validated","Gevalideerd",,
|
||||
"Validated by","Gevalideerd door",,
|
||||
"Validation date","Validatie datum",,
|
||||
"Version Number","Versienummer",,
|
||||
"WT","WT",,
|
||||
"Warning, a completed order can't be changed anymore, do you want to continue?","Waarschuwing, een voltooide bestelling kan niet meer worden gewijzigd, wilt u verdergaan?",,
|
||||
"You have to choose at least one purchase order","U moet ten minste één aankooporder kiezen",,
|
||||
"You must configure Purchase module for the company %s","U moet de Inkoopmodule voor de onderneming configureren %s",,
|
||||
"You need a purchase order associated to line.","U heeft een aankooporder nodig die aan de lijn is gekoppeld.",,
|
||||
"important","belangrijk",,
|
||||
"info","info",,
|
||||
"success","succes",,
|
||||
"value:Purchase","waarde: Aankoop",,
|
||||
"value:Purchase Request","waarde: Aankoopverzoek",,
|
||||
"warning","verwittiging",,
|
||||
"{{ company.name }}","{{bedrijfsnaam }}}",,
|
||||
"{{ stockLocation.name }}","{{ stockLocation.name }}}",,
|
||||
|
@ -0,0 +1,344 @@
|
||||
"key","message","comment","context"
|
||||
"50 Latest Supplier Orders","50 Najnowsze zamówienia od dostawców",,
|
||||
"A tax line is missing","Brakuje linii podatkowej",,
|
||||
"ABC analysis",,,
|
||||
"ATI","ATI",,
|
||||
"AbcAnalysis.endDate",,,
|
||||
"AbcAnalysis.startDate",,,
|
||||
"Accept","Akceptacja",,
|
||||
"Accept and generate PO","Przyjmij i wygeneruj PO",,
|
||||
"Accepted","Przyjęty",,
|
||||
"Actions","Działania",,
|
||||
"Add","Dodaj",,
|
||||
"All requests accepted","Wszystkie przyjęte wnioski",,
|
||||
"All requests sent","Wszystkie wysłane wnioski",,
|
||||
"Amount","Kwota",,
|
||||
"Amount A.T.I.","Kwota A.T.I.",,
|
||||
"Amount Tax",,,
|
||||
"Amount invoiced W.T.","Kwota zafakturowana W.T.",,
|
||||
"Amount to be spread over the timetable","Kwota, która ma być rozłożona na cały rozkład jazdy",,
|
||||
"Analytic distribution",,,
|
||||
"Analytic distribution required on purchase order line",,,
|
||||
"Analytics","Analityka",,
|
||||
"App purchase","Zakup aplikacji",,
|
||||
"Apply to all","Stosuje się do wszystkich",,
|
||||
"Attributes","Atrybuty",,
|
||||
"Base W.T.","Podstawa W.T.",,
|
||||
"Budget","Budżet",,
|
||||
"Budget distribution","Podział budżetu",,
|
||||
"Business Project","Projekt biznesowy",,
|
||||
"Business project","Projekt biznesowy",,
|
||||
"Buyer","Kupujący",,
|
||||
"Calculated price/Qty","Obliczona cena/kwota",,
|
||||
"Cancel","Anulowanie",,
|
||||
"Cancel receipt","Anulowanie paragonu",,
|
||||
"Canceled","Anulowany",,
|
||||
"Characteristics","Charakterystyka",,
|
||||
"Closed Purchase orders","Zamknięte zamówienia zakupu",,
|
||||
"Code",,,
|
||||
"Company","Firma",,
|
||||
"Company bank","Bank przedsiębiorstw",,
|
||||
"Configuration","Konfiguracja",,
|
||||
"Confirm","Potwierdź",,
|
||||
"Confirm my cart","Potwierdź mój koszyk",,
|
||||
"Confirmation","Potwierdzenie",,
|
||||
"Contact","Kontakt",,
|
||||
"Contact partner","Kontakt z partnerem",,
|
||||
"Contacts","Kontakty",,
|
||||
"Content","Zawartość",,
|
||||
"Currency","Waluta",,
|
||||
"Current Purchase orders","Aktualne zamówienia zakupu",,
|
||||
"Custom field","Pole niestandardowe",,
|
||||
"Custom fields","Pola niestandardowe",,
|
||||
"Dashboard","Tablica rozdzielcza",,
|
||||
"Dates","Daty",,
|
||||
"Deliver","Dostawca",,
|
||||
"Deliver Partially","Częściowe dostarczenie",,
|
||||
"Delivery","Dostawa",,
|
||||
"Description","Opis",,
|
||||
"Description To Display","Opis Do wyświetlania",,
|
||||
"Desired receipt date",,,
|
||||
"Discount Type","Typ rabatu",,
|
||||
"Discount amount","Kwota rabatu",,
|
||||
"Discount rate","Stopa dyskontowa",,
|
||||
"Display buyer on printing","Wyświetl kupującego na wydruku",,
|
||||
"Display price on requested purchase printing","Cena wyświetlana na zamówionym druku",,
|
||||
"Display product code on printing","Wyświetlanie kodu produktu na wydruku",,
|
||||
"Display product detail on printing","Wyświetl szczegóły produktu na wydruku",,
|
||||
"Display purchase order line number",,,
|
||||
"Display supplier code on printing",,,
|
||||
"Display tax detail on printing","Wyświetl szczegóły dotyczące podatku przy drukowaniu",,
|
||||
"Displayed Product name","Wyświetlana nazwa produktu",,
|
||||
"Draft","Wstępny projekt",,
|
||||
"Enable product description copy","Włączyć kopię opisu produktu",,
|
||||
"End date",,,
|
||||
"Estim. receipt date","Date de réception estimée",,
|
||||
"Estimated delivery Date","Przewidywana data dostawy",,
|
||||
"Filter on supplier","Filtr u dostawcy",,
|
||||
"Finish the order","Zakończyć zamówienie",,
|
||||
"Finished","Gotowe",,
|
||||
"Fixed Assets","Środki trwałe",,
|
||||
"Follow-up","Działania następcze",,
|
||||
"From Date","Od daty",,
|
||||
"Full name","Pełne imię i nazwisko",,
|
||||
"Generate PO","Generowanie PO",,
|
||||
"Generate control invoice","Generowanie faktury kontrolnej",,
|
||||
"Generate purchase configurations","Generowanie konfiguracji zakupu",,
|
||||
"Generate supplier arrival","Generowanie przyjazdu dostawcy",,
|
||||
"Generate suppliers requests","Generowanie zapytań od dostawców",,
|
||||
"Group by product","Grupa według produktów",,
|
||||
"Group by supplier","Grupa według dostawców",,
|
||||
"Historical","Historyczny",,
|
||||
"Historical Period","Okres historyczny",,
|
||||
"In ATI","W ATI",,
|
||||
"In Stock Moves","W magazynie Roves",,
|
||||
"Information","Informacje",,
|
||||
"Internal Note","Uwaga wewnętrzna",,
|
||||
"Internal Ref.","Wewnętrzny ref.",,
|
||||
"Internal note","Notatka wewnętrzna",,
|
||||
"Internal purchase requests",,,
|
||||
"Invoice Lines","Linie do wystawiania faktur",,
|
||||
"Invoiced","Zafakturowany",,
|
||||
"Invoices","Faktury",,
|
||||
"Invoicing","Fakturowanie",,
|
||||
"Last update","Ostatnia aktualizacja",,
|
||||
"Manage multiple purchase quantity","Zarządzanie wielokrotną ilością zakupów",,
|
||||
"Manage purchase order versions","Zarządzanie wersjami zamówień zakupu",,
|
||||
"Manage purchases unit on products","Zarządzaj zakupami jednostek na produktach",,
|
||||
"Manage supplier catalog","Zarządzanie katalogiem dostawców",,
|
||||
"Merge into single purchase order","Połączenie w jedno zamówienie zakupu",,
|
||||
"Merge purchase orders","Łączenie zamówień zakupu",,
|
||||
"Merge quotations","Łączenie notowań",,
|
||||
"Message for requesting prices","Wiadomość dotycząca żądania cen",,
|
||||
"Min sale price","Min. cena sprzedaży",,
|
||||
"Month","Miesiąc",,
|
||||
"My Closed Purchase orders","Moje zamówienia na zakupy w systemie zamkniętym",,
|
||||
"My Ongoing Purchase orders","Moje bieżące zamówienia",,
|
||||
"My Orders to process","Moje zlecenia do przetworzenia",,
|
||||
"My Purchase orders","Moje zamówienia zakupu",,
|
||||
"My Purchase request","Moja prośba o zakup",,
|
||||
"My RFQs","Moje RFQ",,
|
||||
"My RFQs and POs To Validate (Requested & Received)","Moje RFQ i PO do zatwierdzenia (wymagane i otrzymane)",,
|
||||
"My Sales","Moja sprzedaż",,
|
||||
"My Validated POs","Moje zatwierdzone PO",,
|
||||
"My purchased amount by product accounting family",,,
|
||||
"My purchased qty by product accounting family",,,
|
||||
"Name","Nazwa",,
|
||||
"Nbr of PO by month","Nbr PO według miesiąca",,
|
||||
"New product","Nowy produkt",,
|
||||
"New version","Nowa wersja",,
|
||||
"Not invoiced","Nie zafakturowane",,
|
||||
"Not received","Nie otrzymano.",,
|
||||
"OR","LUB",,
|
||||
"Ongoing Purchase orders","Zamówienia bieżące",,
|
||||
"Order Date","Data zamówienia Data zamówienia",,
|
||||
"Ordered","Zamówienie",,
|
||||
"Overview","Przegląd",,
|
||||
"PO Management","Zarządzanie PO",,
|
||||
"PO Tax line","PO Pozycja podatkowa",,
|
||||
"PO Tax lines","PO Linie podatkowe",,
|
||||
"PO line","Linia PO",,
|
||||
"PO lines","Linie PO",,
|
||||
"PO lines detail","Szczegóły",,
|
||||
"POs Volume by buyer by accounting family",,,
|
||||
"Partial delivery","Dostawa częściowa",,
|
||||
"Partially invoiced","Częściowo zafakturowane",,
|
||||
"Partially received","Częściowo otrzymane",,
|
||||
"Partner price lists","Cenniki partnerskie",,
|
||||
"Percent","Odsetek",,
|
||||
"Please enter at least one detail line.",,,
|
||||
"Please enter supplier for following purchase request : %s",,,
|
||||
"Please fill printing settings on following purchase orders: %s","Proszę wypełnić ustawienia drukowania dla następujących zamówień zakupu: %s",,
|
||||
"Please fill printing settings on purchase order %s","Proszę wypełnić ustawienia drukowania w zamówieniu zakupu %s",,
|
||||
"Please select the purchase order(s) to print.","Proszę wybrać zamówienie(-a) zakupu do wydruku.",,
|
||||
"Price List","Cennik",,
|
||||
"Price list","Cennik",,
|
||||
"Price lists","Cenniki",,
|
||||
"Print","Drukuj",,
|
||||
"Printing","Drukowanie",,
|
||||
"Printing settings","Ustawienia drukowania",,
|
||||
"Product","Produkt",,
|
||||
"Product Accounting Family",,,
|
||||
"Product code on catalog","Kod produktu w katalogu",,
|
||||
"Product name on catalog","Nazwa produktu w katalogu",,
|
||||
"Products & services","Produkty i usługi",,
|
||||
"Products list","Wykaz produktów",,
|
||||
"Purchase","Zakupy",,
|
||||
"Purchase Buyer","Zakup kupującego",,
|
||||
"Purchase Manager","Kierownik ds. zakupów",,
|
||||
"Purchase blocking","Blokowanie zakupów",,
|
||||
"Purchase config","Konfiguracja zakupu",,
|
||||
"Purchase config (${ name })","Zakup konfiguracji (${ nazwa })",,
|
||||
"Purchase configuration","Konfiguracja zakupu",,
|
||||
"Purchase configurations","Konfiguracje zakupu",,
|
||||
"Purchase order","Zamówienie zakupu",,
|
||||
"Purchase order created","Utworzone zamówienie zakupu",,
|
||||
"Purchase order information","Informacje dotyczące zamówienia zakupu",,
|
||||
"Purchase orders","Zamówienia zakupu",,
|
||||
"Purchase orders ATI/WT","Zamówienia zakupu ATI/WT",,
|
||||
"Purchase orders Details","Zamówienia zakupu Szczegóły",,
|
||||
"Purchase orders to merge","Zamówienia zakupu w celu połączenia",,
|
||||
"Purchase quotations","Notowania zakupu",,
|
||||
"Purchase request","Wniosek o zakup",,
|
||||
"Purchase request creator","Twórca wniosku o zakup",,
|
||||
"PurchaseOrder.afterDiscount","po zniżce w wysokości",,
|
||||
"PurchaseOrder.base","Podstawa",,
|
||||
"PurchaseOrder.buyer","Kupujący",,
|
||||
"PurchaseOrder.buyerEmail",,,
|
||||
"PurchaseOrder.buyerPhone",,,
|
||||
"PurchaseOrder.canceled","Anulowany",,
|
||||
"PurchaseOrder.customer","Klient",,
|
||||
"PurchaseOrder.customerRef","Dane referencyjne klienta",,
|
||||
"PurchaseOrder.deliveryAddress","Adres dostawy",,
|
||||
"PurchaseOrder.deliveryDate","Data dostawy",,
|
||||
"PurchaseOrder.description","Opis",,
|
||||
"PurchaseOrder.desiredDelivDate","Żądana data dostawy",,
|
||||
"PurchaseOrder.discountAmount","Zniżka",,
|
||||
"PurchaseOrder.draft","Wstępny projekt",,
|
||||
"PurchaseOrder.finished","Gotowe",,
|
||||
"PurchaseOrder.invoicingAddress","Adres do fakturowania",,
|
||||
"PurchaseOrder.note","Uwaga: Nie należy stosować się do zaleceń zawartych w niniejszej instrukcji obsługi.",,
|
||||
"PurchaseOrder.order","Zarządzenie",,
|
||||
"PurchaseOrder.orderDate","Data zamówienia",,
|
||||
"PurchaseOrder.paymentCondition","Warunki płatności",,
|
||||
"PurchaseOrder.paymentMode","Tryb płatności",,
|
||||
"PurchaseOrder.priceExclTax","Kwota bez podatku",,
|
||||
"PurchaseOrder.priceInclTax","Kwota brutto (w tym podatek)",,
|
||||
"PurchaseOrder.productSequence",,,
|
||||
"PurchaseOrder.productStandard",,,
|
||||
"PurchaseOrder.purchaseInfo","Informacje o zakupie.",,
|
||||
"PurchaseOrder.qtyUnit","Ilość",,
|
||||
"PurchaseOrder.quote","RFQ",,
|
||||
"PurchaseOrder.ref","Odniesienie",,
|
||||
"PurchaseOrder.reference","Odniesienie",,
|
||||
"PurchaseOrder.requested","Wnioskowany",,
|
||||
"PurchaseOrder.state","Status",,
|
||||
"PurchaseOrder.statusCanceled","Anulowanie zamówienia zakupu",,
|
||||
"PurchaseOrder.statusDraft","Projekt zamówienia zakupu",,
|
||||
"PurchaseOrder.statusFinished","Zakończenie zamówienia zakupu",,
|
||||
"PurchaseOrder.statusRequested","Zamówienie zakupu, którego dotyczy wniosek",,
|
||||
"PurchaseOrder.statusValidated","Zatwierdzone zamówienie zakupu",,
|
||||
"PurchaseOrder.supplier","Dostawca",,
|
||||
"PurchaseOrder.supplierCode",,,
|
||||
"PurchaseOrder.supplyRef","Odniesienie do dostawcy",,
|
||||
"PurchaseOrder.tax","Podatek",,
|
||||
"PurchaseOrder.taxAmount","Kwota podatku",,
|
||||
"PurchaseOrder.totalDiscount","Zniżka",,
|
||||
"PurchaseOrder.totalExclTax","Ogółem bez podatku",,
|
||||
"PurchaseOrder.totalExclTaxWithoutDiscount","Razem bez podatku brutto",,
|
||||
"PurchaseOrder.totalInclTax","Razem Inc. Podatek",,
|
||||
"PurchaseOrder.totalTax","Podatek ogółem",,
|
||||
"PurchaseOrder.unitPrice","Cena jednostkowa",,
|
||||
"PurchaseOrder.validated","Zatwierdzony",,
|
||||
"Purchased","Zakupione",,
|
||||
"Purchased amount by accounting family",,,
|
||||
"Purchased amount by product accounting family",,,
|
||||
"Purchased amount distribution by accounting family",,,
|
||||
"Purchases","Zakupy",,
|
||||
"Purchases Order filters","Zakupy Filtry zamówieniowe",,
|
||||
"Purchases follow-up","Działania następcze związane z zakupami",,
|
||||
"Purchases unit","Jednostka zakupów",,
|
||||
"Qty","Ilość",,
|
||||
"Quantity","Ilość",,
|
||||
"Quantity min","Ilość min.",,
|
||||
"Quotation","Cytat",,
|
||||
"RFQ And PO To Validate","RFQ i PO do zatwierdzenia",,
|
||||
"Receipt State","Państwo odbioru",,
|
||||
"Received","Otrzymany",,
|
||||
"Received quantity","Ilość otrzymana",,
|
||||
"Ref.","Nr ref.",,
|
||||
"Reference already existing","Odniesienie już istniejące",,
|
||||
"References","Odniesienia",,
|
||||
"Refuse","Odmowa",,
|
||||
"Refused","Odmówiony",,
|
||||
"Reportings","Sprawozdania",,
|
||||
"Reports","Sprawozdania",,
|
||||
"Request","Żądanie",,
|
||||
"Requested","Wnioskowany",,
|
||||
"Reverse charged","Odwrotne obciążenie",,
|
||||
"Sale orders","Zamówienia sprzedaży",,
|
||||
"Sale price","Cena sprzedaży",,
|
||||
"Sale quotations","Notowania sprzedaży",,
|
||||
"See budget distribution lines",,,
|
||||
"See purchase order lines","Zobacz linie zamówień zakupu",,
|
||||
"See purchase orders lines",,,
|
||||
"See quotation lines","Patrz wiersze cytatu",,
|
||||
"Send Email","Wyślij e-mail",,
|
||||
"Send email","Wyślij wiadomość e-mail",,
|
||||
"Seq.","Seq.",,
|
||||
"Shipping Coefficients","Współczynniki dotyczące żeglugi",,
|
||||
"Show invoice","Pokaż fakturę",,
|
||||
"Start date",,,
|
||||
"Status","Status",,
|
||||
"Stock location","Lokalizacja zapasów",,
|
||||
"Stock move","Przenoszenie zapasów",,
|
||||
"Supplier","Dostawca",,
|
||||
"Supplier Catalog","Katalog dostawcy",,
|
||||
"Supplier Catalog Lines","Linie katalogowe dla dostawców",,
|
||||
"Supplier Comment","Komentarz dostawcy",,
|
||||
"Supplier RFQ/PO","Dostawca RFQ/PO",,
|
||||
"Supplier RFQs/POs","Dostawca RFQ/PO",,
|
||||
"Supplier box in purchase order","Skrzynka dostawcy w zamówieniu",,
|
||||
"Supplier catalog","Katalog dostawcy",,
|
||||
"Supplier code",,,
|
||||
"Supplier invoices","Faktury dla dostawców",,
|
||||
"Supplier is required to generate a purchase order.",,,
|
||||
"Supplier ref.","Dostawca nr ref.",,
|
||||
"Suppliers","Dostawcy",,
|
||||
"Suppliers Map","Mapa dostawców",,
|
||||
"Suppliers requests","Wnioski dostawców",,
|
||||
"Tax","Podatek",,
|
||||
"Tax Equiv","Podatek Equiv",,
|
||||
"Tax Lines","Linie podatkowe",,
|
||||
"Team","Zespół",,
|
||||
"The company %s doesn't have any configured sequence for the purchase orders","Firma %s nie posiada skonfigurowanej sekwencji zamówień zakupu",,
|
||||
"The company is required and must be the same for all purchase orders","Firma jest wymagana i musi być taka sama dla wszystkich zamówień zakupu",,
|
||||
"The currency is required and must be the same for all purchase orders","Waluta jest wymagana i musi być taka sama dla wszystkich zamówień zakupu",,
|
||||
"The field 'Stock Location' must be filled.","Należy wypełnić pole Stock Location.",,
|
||||
"The line cannot be null.","Linia nie może być pusta.",,
|
||||
"The minimum order quantity of %s to the supplier is not respected.","Nie jest przestrzegana minimalna ilość zamówienia dostawcy w %.",,
|
||||
"The supplier Partner is required and must be the same for all purchase orders","Partner dostawcy jest wymagany i musi być taki sam dla wszystkich zamówień zakupu",,
|
||||
"The trading name must be the same for all purchase orders","Nazwa handlowa musi być taka sama dla wszystkich zleceń kupna",,
|
||||
"There is no sequence set for the purchase requests for the company %s",,,
|
||||
"This product is not available from the supplier.","Ten produkt nie jest dostępny u dostawcy.",,
|
||||
"This supplier is blocked:","Ten dostawca jest zablokowany:",,
|
||||
"Timetable","Rozkład lotów",,
|
||||
"Title","Tytuł",,
|
||||
"Title Line","Linia Tytułowa",,
|
||||
"To Date","Do daty",,
|
||||
"Tools","Narzędzia",,
|
||||
"Total A.T.I.","Ogółem A.T.I.",,
|
||||
"Total A.T.I. in company currency","Łącznie A.T.I. w walucie przedsiębiorstwa",,
|
||||
"Total Purchased Amount by month","Łączna zakupiona kwota według miesięcy",,
|
||||
"Total Purchased Qty by month","Łączna liczba zakupionych kwartałów według miesięcy",,
|
||||
"Total Tax","Podatek ogółem",,
|
||||
"Total W.T.","Ogółem W.T.",,
|
||||
"Total W.T. in company currency","Ogółem W.T. w walucie firmy",,
|
||||
"Total tax","Razem podatek",,
|
||||
"Trading name","Nazwa handlowa",,
|
||||
"Turn Over","Obróć się",,
|
||||
"Unit","Jednostka",,
|
||||
"Unit price","Cena jednostkowa",,
|
||||
"Unit price A.T.I.","Cena jednostkowa A.T.I.",,
|
||||
"Unit price W.T.","Cena jednostkowa W.T.",,
|
||||
"Unit price discounted","Cena jednostkowa zdyskontowana",,
|
||||
"Units","Jednostki",,
|
||||
"Update lines with selected project","Aktualizacja wierszy z wybranym projektem",,
|
||||
"Validate","Zatwierdzić",,
|
||||
"Validated","Zatwierdzony",,
|
||||
"Validated by","Zatwierdzone przez",,
|
||||
"Validation date","Data ważności",,
|
||||
"Version Number","Wersja Numer wersji",,
|
||||
"WT","WT",,
|
||||
"Warning, a completed order can't be changed anymore, do you want to continue?","Ostrzeżenie, wykonane zlecenie nie może już być zmienione, czy chcesz kontynuować?",,
|
||||
"You have to choose at least one purchase order","Musisz wybrać co najmniej jedno zamówienie",,
|
||||
"You must configure Purchase module for the company %s","Musisz skonfigurować moduł Zakup dla firmy %s",,
|
||||
"You need a purchase order associated to line.","Potrzebujesz zamówienia zakupu związanego z linią.",,
|
||||
"important","ważny",,
|
||||
"info","informacja",,
|
||||
"success","powodzenie",,
|
||||
"value:Purchase","wartość: zakup",,
|
||||
"value:Purchase Request","wartość: wniosek o zakup",,
|
||||
"warning","ostrzegawczy",,
|
||||
"{{ company.name }}","{{ company.name }}",,
|
||||
"{{ stockLocation.name }}","{{ stockLocation.name }}",,
|
||||
|
@ -0,0 +1,344 @@
|
||||
"key","message","comment","context"
|
||||
"50 Latest Supplier Orders","50 últimos pedidos de fornecedores",,
|
||||
"A tax line is missing","Falta uma linha de imposto",,
|
||||
"ABC analysis",,,
|
||||
"ATI","ATI",,
|
||||
"AbcAnalysis.endDate",,,
|
||||
"AbcAnalysis.startDate",,,
|
||||
"Accept","Aceitar",,
|
||||
"Accept and generate PO","Aceitar e gerar pedido",,
|
||||
"Accepted","Aceite",,
|
||||
"Actions","Ações",,
|
||||
"Add","Adicionar",,
|
||||
"All requests accepted","Todos os pedidos aceites",,
|
||||
"All requests sent","Todos os pedidos enviados",,
|
||||
"Amount","Montante",,
|
||||
"Amount A.T.I.","Montante A.T.I.",,
|
||||
"Amount Tax",,,
|
||||
"Amount invoiced W.T.","Montante faturado W.T.",,
|
||||
"Amount to be spread over the timetable","Montante a repartir ao longo do calendário",,
|
||||
"Analytic distribution",,,
|
||||
"Analytic distribution required on purchase order line",,,
|
||||
"Analytics","Análises",,
|
||||
"App purchase","Compra de aplicativos",,
|
||||
"Apply to all","Aplicar a todos",,
|
||||
"Attributes","Atributos",,
|
||||
"Base W.T.","Base W.T.",,
|
||||
"Budget","Orçamentos",,
|
||||
"Budget distribution","Distribuição de orçamento",,
|
||||
"Business Project","Projeto de Negócios",,
|
||||
"Business project","Projeto empresarial",,
|
||||
"Buyer","Comprador",,
|
||||
"Calculated price/Qty","Preço calculado/Quantidade",,
|
||||
"Cancel","Cancelar",,
|
||||
"Cancel receipt","Cancelar recibo",,
|
||||
"Canceled","Cancelado",,
|
||||
"Characteristics","Características",,
|
||||
"Closed Purchase orders","Pedidos fechados",,
|
||||
"Code",,,
|
||||
"Company","Empresa",,
|
||||
"Company bank","Banco da empresa",,
|
||||
"Configuration","Configuração",,
|
||||
"Confirm","Confirmar",,
|
||||
"Confirm my cart","Confirmar o meu carrinho",,
|
||||
"Confirmation","Confirmação",,
|
||||
"Contact","Contato",,
|
||||
"Contact partner","Parceiro de contato",,
|
||||
"Contacts","Contactos",,
|
||||
"Content","Conteúdo",,
|
||||
"Currency","Moeda",,
|
||||
"Current Purchase orders","Pedidos atuais",,
|
||||
"Custom field","Campo personalizado",,
|
||||
"Custom fields","Campos personalizados",,
|
||||
"Dashboard","Painel de instrumentos",,
|
||||
"Dates","Datas",,
|
||||
"Deliver","Entregar",,
|
||||
"Deliver Partially","Entrega parcial",,
|
||||
"Delivery","Entrega",,
|
||||
"Description","Descrição do produto",,
|
||||
"Description To Display","Descrição Para exibir",,
|
||||
"Desired receipt date",,,
|
||||
"Discount Type","Tipo de desconto",,
|
||||
"Discount amount","Valor do desconto",,
|
||||
"Discount rate","Taxa de desconto",,
|
||||
"Display buyer on printing","Exibir comprador na impressão",,
|
||||
"Display price on requested purchase printing","Exibir preço na impressão da compra solicitada",,
|
||||
"Display product code on printing","Exibir código de produto na impressão",,
|
||||
"Display product detail on printing","Exibir detalhes do produto na impressão",,
|
||||
"Display purchase order line number",,,
|
||||
"Display supplier code on printing",,,
|
||||
"Display tax detail on printing","Exibir detalhes de imposto na impressão",,
|
||||
"Displayed Product name","Nome do produto exibido",,
|
||||
"Draft","Rascunho",,
|
||||
"Enable product description copy","Ativar cópia da descrição do produto",,
|
||||
"End date",,,
|
||||
"Estim. receipt date",,,
|
||||
"Estimated delivery Date","Data estimada de entrega",,
|
||||
"Filter on supplier","Filtro no fornecedor",,
|
||||
"Finish the order","Concluir a ordem",,
|
||||
"Finished","Acabado",,
|
||||
"Fixed Assets","Imobilizado",,
|
||||
"Follow-up","Acompanhamento",,
|
||||
"From Date","Data de início",,
|
||||
"Full name","Nome completo",,
|
||||
"Generate PO","Gerar pedido",,
|
||||
"Generate control invoice","Gerar fatura de controle",,
|
||||
"Generate purchase configurations","Gerar configurações de compra",,
|
||||
"Generate supplier arrival","Gerar chegada do fornecedor",,
|
||||
"Generate suppliers requests","Gerar solicitações de fornecedores",,
|
||||
"Group by product","Agrupar por produto",,
|
||||
"Group by supplier","Agrupar por fornecedor",,
|
||||
"Historical","Histórico",,
|
||||
"Historical Period","Período Histórico",,
|
||||
"In ATI","Em ATI",,
|
||||
"In Stock Moves","Em movimentos de estoque",,
|
||||
"Information","Informação",,
|
||||
"Internal Note","Nota interna",,
|
||||
"Internal Ref.","Ref. interna",,
|
||||
"Internal note","Nota interna",,
|
||||
"Internal purchase requests",,,
|
||||
"Invoice Lines","Linhas de faturas",,
|
||||
"Invoiced","Faturação",,
|
||||
"Invoices","Facturas",,
|
||||
"Invoicing","Facturação",,
|
||||
"Last update","Última atualização",,
|
||||
"Manage multiple purchase quantity","Administrar várias quantidades de compras",,
|
||||
"Manage purchase order versions","Administrar versões de pedidos",,
|
||||
"Manage purchases unit on products","Gerir a unidade de compras nos produtos",,
|
||||
"Manage supplier catalog","Gerenciar catálogo de fornecedores",,
|
||||
"Merge into single purchase order","Fusão em um único pedido de compra",,
|
||||
"Merge purchase orders","Fusão de pedidos de compra",,
|
||||
"Merge quotations","Fundir cotações",,
|
||||
"Message for requesting prices","Mensagem de solicitação de preços",,
|
||||
"Min sale price","Preço de venda mínimo",,
|
||||
"Month","Mês",,
|
||||
"My Closed Purchase orders","Meus pedidos de compra fechados",,
|
||||
"My Ongoing Purchase orders","Meus pedidos de compra em andamento",,
|
||||
"My Orders to process","Minhas Encomendas a processar",,
|
||||
"My Purchase orders","Minhas ordens de compra",,
|
||||
"My Purchase request","Meu pedido de compra",,
|
||||
"My RFQs","Minhas solicitações de cotação",,
|
||||
"My RFQs and POs To Validate (Requested & Received)","Minhas solicitações de cotação e pedidos a validar (solicitadas e recebidas)",,
|
||||
"My Sales","Minhas vendas",,
|
||||
"My Validated POs","As minhas OP validadas",,
|
||||
"My purchased amount by product accounting family",,,
|
||||
"My purchased qty by product accounting family",,,
|
||||
"Name","Nome e Sobrenome",,
|
||||
"Nbr of PO by month","Quantidade de PO por mês",,
|
||||
"New product","Novo produto",,
|
||||
"New version","Nova versão",,
|
||||
"Not invoiced","Não faturado",,
|
||||
"Not received","Não recebido",,
|
||||
"OR","OU",,
|
||||
"Ongoing Purchase orders","Pedidos de compra em curso",,
|
||||
"Order Date","Data do pedido",,
|
||||
"Ordered","Encomendado",,
|
||||
"Overview","Visão Geral",,
|
||||
"PO Management","Gestão de PO",,
|
||||
"PO Tax line","PO Linha de imposto",,
|
||||
"PO Tax lines","Linhas de imposto PO",,
|
||||
"PO line","Linha PO",,
|
||||
"PO lines","Linhas PO",,
|
||||
"PO lines detail","Detalhe",,
|
||||
"POs Volume by buyer by accounting family",,,
|
||||
"Partial delivery","Fornecimento parcial",,
|
||||
"Partially invoiced","Parcialmente faturado",,
|
||||
"Partially received","Parcialmente recebidos",,
|
||||
"Partner price lists","Listas de preços de parceiros",,
|
||||
"Percent","Porcentagem",,
|
||||
"Please enter at least one detail line.",,,
|
||||
"Please enter supplier for following purchase request : %s",,,
|
||||
"Please fill printing settings on following purchase orders: %s","Por favor, preencha as configurações de impressão nos seguintes pedidos de compra: %s",,
|
||||
"Please fill printing settings on purchase order %s","Por favor, preencha as configurações de impressão no pedido de compra %s",,
|
||||
"Please select the purchase order(s) to print.","Selecione o(s) pedido(s) de compra a ser(em) impresso(s).",,
|
||||
"Price List","Lista de Preços",,
|
||||
"Price list","Lista de preços",,
|
||||
"Price lists","Listas de preços",,
|
||||
"Print","Imprimir",,
|
||||
"Printing","Impressão",,
|
||||
"Printing settings","Configurações de impressão",,
|
||||
"Product","Produto",,
|
||||
"Product Accounting Family",,,
|
||||
"Product code on catalog","Código do produto no catálogo",,
|
||||
"Product name on catalog","Nome do produto no catálogo",,
|
||||
"Products & services","Produtos e serviços",,
|
||||
"Products list","Lista de produtos",,
|
||||
"Purchase","Compra",,
|
||||
"Purchase Buyer","Compra Comprador",,
|
||||
"Purchase Manager","Gerente de compras",,
|
||||
"Purchase blocking","Bloqueio de compras",,
|
||||
"Purchase config","Configuração de compra",,
|
||||
"Purchase config (${ name })","Configuração de compra (${ nome })",,
|
||||
"Purchase configuration","Configuração de compra",,
|
||||
"Purchase configurations","Configurações de compra",,
|
||||
"Purchase order","Pedido de compra",,
|
||||
"Purchase order created","Pedido criado",,
|
||||
"Purchase order information","Informações sobre o pedido de compra",,
|
||||
"Purchase orders","Pedidos de compra",,
|
||||
"Purchase orders ATI/WT","Pedidos ATI/WT",,
|
||||
"Purchase orders Details","Detalhes dos pedidos de compra",,
|
||||
"Purchase orders to merge","Pedidos para fundir",,
|
||||
"Purchase quotations","Cotações de compra",,
|
||||
"Purchase request","Pedido de compra",,
|
||||
"Purchase request creator","Criador do pedido de compra",,
|
||||
"PurchaseOrder.afterDiscount","após um desconto de",,
|
||||
"PurchaseOrder.base","Base",,
|
||||
"PurchaseOrder.buyer","Comprador",,
|
||||
"PurchaseOrder.buyerEmail",,,
|
||||
"PurchaseOrder.buyerPhone",,,
|
||||
"PurchaseOrder.canceled","Cancelado",,
|
||||
"PurchaseOrder.customer","Cliente",,
|
||||
"PurchaseOrder.customerRef","Referência do cliente",,
|
||||
"PurchaseOrder.deliveryAddress","Endereço de entrega",,
|
||||
"PurchaseOrder.deliveryDate","Data de entrega",,
|
||||
"PurchaseOrder.description","Descrição do produto",,
|
||||
"PurchaseOrder.desiredDelivDate","Data de entrega desejada",,
|
||||
"PurchaseOrder.discountAmount","Desconto",,
|
||||
"PurchaseOrder.draft","Rascunho",,
|
||||
"PurchaseOrder.finished","Acabado",,
|
||||
"PurchaseOrder.invoicingAddress","Endereço de facturação",,
|
||||
"PurchaseOrder.note","Nota",,
|
||||
"PurchaseOrder.order","Encomenda",,
|
||||
"PurchaseOrder.orderDate","Data do pedido",,
|
||||
"PurchaseOrder.paymentCondition","Condição de pagamento",,
|
||||
"PurchaseOrder.paymentMode","Modo de pagamento",,
|
||||
"PurchaseOrder.priceExclTax","Valor Excl. Imposto",,
|
||||
"PurchaseOrder.priceInclTax","Valor incl. imposto",,
|
||||
"PurchaseOrder.productSequence",,,
|
||||
"PurchaseOrder.productStandard",,,
|
||||
"PurchaseOrder.purchaseInfo","Informação de compra.",,
|
||||
"PurchaseOrder.qtyUnit","Quantidade",,
|
||||
"PurchaseOrder.quote","RFQ",,
|
||||
"PurchaseOrder.ref","Referência",,
|
||||
"PurchaseOrder.reference","Referência",,
|
||||
"PurchaseOrder.requested","Solicitado",,
|
||||
"PurchaseOrder.state","Estado",,
|
||||
"PurchaseOrder.statusCanceled","Pedido cancelado",,
|
||||
"PurchaseOrder.statusDraft","Esboço de pedido de compra",,
|
||||
"PurchaseOrder.statusFinished","Pedido concluído",,
|
||||
"PurchaseOrder.statusRequested","Pedido de compra solicitado",,
|
||||
"PurchaseOrder.statusValidated","Pedido validado",,
|
||||
"PurchaseOrder.supplier","Fornecedor",,
|
||||
"PurchaseOrder.supplierCode",,,
|
||||
"PurchaseOrder.supplyRef","Referência do fornecedor",,
|
||||
"PurchaseOrder.tax","Tributário",,
|
||||
"PurchaseOrder.taxAmount","Valor do imposto",,
|
||||
"PurchaseOrder.totalDiscount","Desconto",,
|
||||
"PurchaseOrder.totalExclTax","Total Excl. Imposto",,
|
||||
"PurchaseOrder.totalExclTaxWithoutDiscount","Total bruto bruto Impostos Excl.",,
|
||||
"PurchaseOrder.totalInclTax","Total Inc. Tributário",,
|
||||
"PurchaseOrder.totalTax","Imposto total",,
|
||||
"PurchaseOrder.unitPrice","Preço unitário",,
|
||||
"PurchaseOrder.validated","Validado",,
|
||||
"Purchased","Comprado",,
|
||||
"Purchased amount by accounting family",,,
|
||||
"Purchased amount by product accounting family",,,
|
||||
"Purchased amount distribution by accounting family",,,
|
||||
"Purchases","Compras",,
|
||||
"Purchases Order filters","Filtros de pedidos de compra",,
|
||||
"Purchases follow-up","Acompanhamento de compras",,
|
||||
"Purchases unit","Unidade de compras",,
|
||||
"Qty","Quantidade",,
|
||||
"Quantity","Quantidade",,
|
||||
"Quantity min","Quantidade min.",,
|
||||
"Quotation","Cotação",,
|
||||
"RFQ And PO To Validate","Solicitação de cotação e pedido para validar",,
|
||||
"Receipt State","Estado de recebimento",,
|
||||
"Received","Recebido",,
|
||||
"Received quantity","Quantidade recebida",,
|
||||
"Ref.","Ref.",,
|
||||
"Reference already existing","Referência já existente",,
|
||||
"References","Referências",,
|
||||
"Refuse","Recusar",,
|
||||
"Refused","Recusado",,
|
||||
"Reportings","Relatórios",,
|
||||
"Reports","Relatórios",,
|
||||
"Request","Solicitar",,
|
||||
"Requested","Solicitado",,
|
||||
"Reverse charged","Carga reversa",,
|
||||
"Sale orders","Ordens de venda",,
|
||||
"Sale price","Preço de venda",,
|
||||
"Sale quotations","Cotações de venda",,
|
||||
"See budget distribution lines",,,
|
||||
"See purchase order lines","Vide linhas de pedido de compra",,
|
||||
"See purchase orders lines",,,
|
||||
"See quotation lines","Ver linhas de cotação",,
|
||||
"Send Email","Enviar e-mail",,
|
||||
"Send email","Enviar e-mail",,
|
||||
"Seq.","Seq.",,
|
||||
"Shipping Coefficients","Coeficientes de expedição",,
|
||||
"Show invoice","Mostrar fatura",,
|
||||
"Start date",,,
|
||||
"Status","Estado",,
|
||||
"Stock location","Localização do estoque",,
|
||||
"Stock move","Movimento de estoque",,
|
||||
"Supplier","Fornecedor",,
|
||||
"Supplier Catalog","Catálogo de fornecedores",,
|
||||
"Supplier Catalog Lines","Linhas de Catálogo de Fornecedores",,
|
||||
"Supplier Comment","Comentário do fornecedor",,
|
||||
"Supplier RFQ/PO","Solicitação de cotação/ordem de compra do fornecedor",,
|
||||
"Supplier RFQs/POs","Solicitações de cotação/Os do fornecedor",,
|
||||
"Supplier box in purchase order","Caixa do fornecedor no pedido de compra",,
|
||||
"Supplier catalog","Catálogo de fornecedores",,
|
||||
"Supplier code",,,
|
||||
"Supplier invoices","Faturas de fornecedores",,
|
||||
"Supplier is required to generate a purchase order.",,,
|
||||
"Supplier ref.","Fornecedor ref.",,
|
||||
"Suppliers","Fornecedores",,
|
||||
"Suppliers Map","Mapa de Fornecedores",,
|
||||
"Suppliers requests","Pedidos de fornecedores",,
|
||||
"Tax","Tributário",,
|
||||
"Tax Equiv","Imposto Equiv",,
|
||||
"Tax Lines","Linhas de imposto",,
|
||||
"Team","Equipe",,
|
||||
"The company %s doesn't have any configured sequence for the purchase orders","A empresa %s não possui nenhuma seqüência configurada para os pedidos",,
|
||||
"The company is required and must be the same for all purchase orders","A sociedade é necessária e deve ser a mesma para todos os pedidos",,
|
||||
"The currency is required and must be the same for all purchase orders","A moeda é necessária e deve ser a mesma para todos os pedidos de compra",,
|
||||
"The field 'Stock Location' must be filled.","O campo 'Depósito em depósito' deve ser preenchido.",,
|
||||
"The line cannot be null.","A linha não pode ser nula.",,
|
||||
"The minimum order quantity of %s to the supplier is not respected.","A quantidade mínima de encomenda de %s ao fornecedor não é respeitada.",,
|
||||
"The supplier Partner is required and must be the same for all purchase orders","O fornecedor Parceiro é necessário e deve ser o mesmo para todos os pedidos",,
|
||||
"The trading name must be the same for all purchase orders","O nome comercial deve ser o mesmo para todas as ordens de compra",,
|
||||
"There is no sequence set for the purchase requests for the company %s",,,
|
||||
"This product is not available from the supplier.","Este produto não está disponível no fornecedor.",,
|
||||
"This supplier is blocked:","Este fornecedor está bloqueado:",,
|
||||
"Timetable","Calendário",,
|
||||
"Title","Título",,
|
||||
"Title Line","Linha do Título",,
|
||||
"To Date","Até à data",,
|
||||
"Tools","Ferramentas",,
|
||||
"Total A.T.I.","Total A.T.I.",,
|
||||
"Total A.T.I. in company currency","Total A.T.I. na moeda da empresa",,
|
||||
"Total Purchased Amount by month","Valor total comprado por mês",,
|
||||
"Total Purchased Qty by month","Qtd. total comprada por mês",,
|
||||
"Total Tax","Imposto total",,
|
||||
"Total W.T.","T.I.T. total",,
|
||||
"Total W.T. in company currency","T.I.T. total na moeda da empresa",,
|
||||
"Total tax","Imposto total",,
|
||||
"Trading name","Nome comercial",,
|
||||
"Turn Over","Turn Over",,
|
||||
"Unit","Unidade",,
|
||||
"Unit price","Preço unitário",,
|
||||
"Unit price A.T.I.","Preço unitário A.T.I.",,
|
||||
"Unit price W.T.","Preço unitário W.T.",,
|
||||
"Unit price discounted","Preço unitário com desconto",,
|
||||
"Units","Unidades",,
|
||||
"Update lines with selected project","Atualizar linhas com o projeto selecionado",,
|
||||
"Validate","Validar",,
|
||||
"Validated","Validado",,
|
||||
"Validated by","Validado por",,
|
||||
"Validation date","Data de validação",,
|
||||
"Version Number","Número da versão",,
|
||||
"WT","WT",,
|
||||
"Warning, a completed order can't be changed anymore, do you want to continue?","Atenção, uma ordem concluída não pode ser alterada, queres continuar?",,
|
||||
"You have to choose at least one purchase order","É necessário selecionar pelo menos um pedido",,
|
||||
"You must configure Purchase module for the company %s","Você deve configurar o módulo de Compras para a empresa %s",,
|
||||
"You need a purchase order associated to line.","É necessário um pedido associado à linha.",,
|
||||
"important","importante",,
|
||||
"info","informação",,
|
||||
"success","êxito",,
|
||||
"value:Purchase","valor:Compra",,
|
||||
"value:Purchase Request","valor:Pedido de Compra",,
|
||||
"warning","advertência",,
|
||||
"{{ company.name }}","Companhia. Nome",,
|
||||
"{{ stockLocation.name }}","Localizaçao.nome",,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user