@@ -143,6 +143,9 @@
|
||||
|
||||
<string name="headOfficeAddress" title="Head office address"/>
|
||||
|
||||
<!-- is approach -->
|
||||
<boolean name="isInvoiceApproach" title="Facture d'approche" />
|
||||
|
||||
<unique-constraint columns="invoiceId,company"/>
|
||||
|
||||
<extra-code><![CDATA[
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.List;
|
||||
|
||||
import com.axelor.apps.purchase.db.ImportationFolder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.exception.AxelorException;
|
||||
|
||||
import wslite.json.JSONException;
|
||||
|
||||
public interface ImportationFolderService {
|
||||
|
||||
public void draftImportationFolder(ImportationFolder importationFolder);
|
||||
@@ -12,4 +18,6 @@ public interface ImportationFolderService {
|
||||
public void closeImportationFolder(ImportationFolder importationFolder);
|
||||
|
||||
public void cancelImportationFolder(ImportationFolder importationFolder);
|
||||
|
||||
public void calculateSum(List<PurchaseOrder> purchaseOrders,ImportationFolder importationFolder) throws MalformedURLException, JSONException, AxelorException;
|
||||
}
|
||||
@@ -1,12 +1,26 @@
|
||||
package com.axelor.apps.purchase.service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.List;
|
||||
|
||||
import com.axelor.apps.base.db.Currency;
|
||||
import com.axelor.apps.base.db.repo.CurrencyRepository;
|
||||
import com.axelor.apps.base.service.CurrencyConversionService;
|
||||
import com.axelor.apps.base.service.CurrencyService;
|
||||
import com.axelor.apps.base.service.administration.SequenceService;
|
||||
import com.axelor.apps.purchase.db.ImportationFolder;
|
||||
import com.axelor.apps.purchase.db.PurchaseOrder;
|
||||
import com.axelor.apps.purchase.db.repo.ImportationFolderRepository;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.persist.Transactional;
|
||||
|
||||
import wslite.json.JSONException;
|
||||
|
||||
import com.axelor.inject.Beans;
|
||||
|
||||
|
||||
public class ImportationFolderServiceImpl implements ImportationFolderService {
|
||||
|
||||
@Inject
|
||||
@@ -37,4 +51,44 @@ public class ImportationFolderServiceImpl implements ImportationFolderService {
|
||||
// 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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,10 @@ 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 wslite.json.JSONException;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@@ -103,7 +107,7 @@ public interface PurchaseOrderService {
|
||||
|
||||
public void draftPurchaseOrder(PurchaseOrder purchaseOrder);
|
||||
|
||||
public void validatePurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException;
|
||||
public void validatePurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException, MalformedURLException, JSONException;
|
||||
|
||||
public void finishPurchaseOrder(PurchaseOrder purchaseOrder);
|
||||
|
||||
|
||||
@@ -27,18 +27,22 @@ 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.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.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.repo.ImportationFolderRepository;
|
||||
import com.axelor.apps.purchase.db.repo.PurchaseOrderRepository;
|
||||
import com.axelor.apps.purchase.exception.IExceptionMessage;
|
||||
import com.axelor.apps.purchase.report.IReport;
|
||||
@@ -53,8 +57,12 @@ import com.axelor.inject.Beans;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.persist.Transactional;
|
||||
|
||||
import wslite.json.JSONException;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.MalformedURLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -74,6 +82,7 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
||||
@Inject protected AppPurchaseService appPurchaseService;
|
||||
|
||||
@Inject protected PurchaseOrderRepository purchaseOrderRepo;
|
||||
@Inject protected ImportationFolderRepository importationFolderRepository;
|
||||
|
||||
@Override
|
||||
public PurchaseOrder _computePurchaseOrderLines(PurchaseOrder purchaseOrder)
|
||||
@@ -449,7 +458,7 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public void validatePurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
public void validatePurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException, MalformedURLException, JSONException {
|
||||
computePurchaseOrder(purchaseOrder);
|
||||
|
||||
purchaseOrder.setStatusSelect(PurchaseOrderRepository.STATUS_VALIDATED);
|
||||
@@ -459,6 +468,12 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
||||
purchaseOrder.setSupplierPartner(validateSupplier(purchaseOrder));
|
||||
|
||||
updateCostPrice(purchaseOrder);
|
||||
|
||||
if(purchaseOrder.getImportationFolder() != null){
|
||||
List<PurchaseOrder> purchaseOrders = purchaseOrder.getImportationFolder().getPurchaseOrderList();
|
||||
ImportationFolder importationFolder = purchaseOrder.getImportationFolder();
|
||||
calculateSum(purchaseOrders, importationFolder);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -474,4 +489,43 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
||||
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);
|
||||
|
||||
importationFolderRepository.save(importationFolder);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
|
||||
<sequence name="importation.seq" initial="1" increment="1" padding="5" prefix="DOSIMP"/>
|
||||
|
||||
<entity name="ImportationFolder" sequential="true">
|
||||
<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="purchaseOrder" ref="com.axelor.apps.purchase.db.PurchaseOrder" title="Purchase order"/>
|
||||
<one-to-many name="purchaseOrderList" ref="PurchaseOrder" mappedBy="importationFolder" title="Purchase order"/>
|
||||
<many-to-one name="forwardingPartner" ref="com.axelor.apps.base.db.Partner" required="true" title="Forwarding Partner"/>
|
||||
<many-to-one name="supplierPartner" ref="com.axelor.apps.base.db.Partner" required="true" title="Supplier"/>
|
||||
<string name="containerNumber" title="Number Container."/>
|
||||
<date name="boardingDate" title="Boarding Date"/>
|
||||
<date name="boardingDate" title="DATE D'EMBARQUEMENT"/>
|
||||
<date name="arrivalGoodiDate" title="Arrival goods"/>
|
||||
<date name="arrivalDocDate" title="Arrival Documents"/>
|
||||
<date name="invoiceDirectDebitDate" title="Invoice direct debit"/>
|
||||
@@ -22,7 +22,7 @@
|
||||
<date name="d_10_date" title="Date D10"/>
|
||||
<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 %" />
|
||||
<integer name="progress" title="Progress %" min="0" max="100" />
|
||||
<integer name="orderByState"/>
|
||||
|
||||
<decimal name="amount" precision="20" scale="4"/>
|
||||
@@ -36,6 +36,18 @@
|
||||
<!-- <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="libelle" />
|
||||
<date name="estimdatedBoardingDate" title="DATE D'EMBARQUEMENT PREVU" />
|
||||
<date name="liquidation_date" title="DATE DE LIQUIDATION" />
|
||||
<date name="reception_sophal_date" title="ARRIVEE SOPHAL" />
|
||||
<date name="reception_magasin_date" title="RECEPTION MAGASIN SOPHAL" />
|
||||
<date name="transmission_dg_date" title="Date transmission a la DG" />
|
||||
|
||||
<date name="delivery_date" title="DATE DE LIVRAISON PREVU" />
|
||||
|
||||
|
||||
|
||||
<extra-code>
|
||||
<![CDATA[
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
<!-- importation folder -->
|
||||
<integer name="importationType" selection="importation.folder.type.select" title="Type d'importation" default="1" />
|
||||
<many-to-one name="importationFolder" ref="com.axelor.apps.purchase.db.ImportationFolder" title="Dossier d'importation" />
|
||||
<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" />
|
||||
|
||||
|
||||
@@ -2,72 +2,115 @@
|
||||
<object-views xmlns="http://axelor.com/xml/ns/object-views"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_5.2.xsd">
|
||||
|
||||
<form name="importation-folder-form" title="Dossier d'importation" model="com.axelor.apps.purchase.db.ImportationFolder">
|
||||
<form name="importation-folder-form" title="Dossier d'importation" model="com.axelor.apps.purchase.db.ImportationFolder" onLoad="action-purchase-importation-folder-method-compute">
|
||||
<panel name="mainPanel" >
|
||||
<field name="statusSelect" widget="nav-select" readonly="true" default="1" colSpan="12" showTitle="false"/>
|
||||
<field name="importationFolderSeq" showTitle="false">
|
||||
<viewer depends="importationFolderSeq"><![CDATA[
|
||||
<field name="name" showTitle="false" readonly="true" colSpan="10">
|
||||
<viewer depends="statusSelect,name"><![CDATA[
|
||||
<h3>
|
||||
<span ng-show="record.importationFolderSeq" x-translate>Importation Folder</span>
|
||||
{{record.importationFolderSeq}}
|
||||
<span x-translate>Dossier d'importation</span>
|
||||
{{record.name}}
|
||||
</h3>
|
||||
]]>
|
||||
</viewer>
|
||||
]]></viewer>
|
||||
</field>
|
||||
<spacer colSpan="12" />
|
||||
<field name="containerNumber" title="N° Contenaire"/>
|
||||
<field name="forwardingPartner" form-view="partner-form" grid-view="partner-grid" title="Code transitaire"/>
|
||||
<field name="supplierPartner" form-view="partner-form" grid-view="partner-grid" title="Code fournisseur"/>
|
||||
<field name="progress" max="100" min="0" colSpan="12" widget="SelectProgress">
|
||||
<editor>
|
||||
<field name="progress" showTitle="false" colSpan="3"/>
|
||||
</editor>
|
||||
</field>
|
||||
<spacer colSpan="12" />
|
||||
<field name="boardingDate" title="Date embarquement"/>
|
||||
<field name="arrivalGoodiDate" title="Date arrivee marchandise"/>
|
||||
<field name="arrivalDocDate" title="Date arrivee document"/>
|
||||
<field name="invoiceDirectDebitDate" title="Date domiciliation facture"/>
|
||||
<field name="folderReceptionDate" title="Date reception dossier"/>
|
||||
<field name="arrivalNoticeDate" title="Date avis arrivee"/>
|
||||
<field name="containerNumber" title="N° Contenaire" colSpan="12" css="label-bold bold large"/>
|
||||
<spacer colSpan="12" />
|
||||
|
||||
<panel title="Supply Chain" colSpan="12">
|
||||
<field name="priority" selection="purchase.importation.folder.priority.select" default="1" />
|
||||
<field name="label" title="libelle" />
|
||||
<field name="created_by" title="Traite par" />
|
||||
<field name="supplierPartner" form-view="partner-form" grid-view="partner-grid" title="Code fournisseur"/>
|
||||
<field name="estimdatedBoardingDate" title="DATE D'EMBARQUEMENT PREVU" />
|
||||
<field name="reception_sophal_date" title="RECEPTION MAGASIN SOPHAL" />
|
||||
</panel>
|
||||
|
||||
<field name="d_10_date" title="Date d10" />
|
||||
<field name="valorisation" title="Type de valorisation"/>
|
||||
<field name="currency" title="Devise" />
|
||||
<field name="contract" title="Type de contrat" />
|
||||
|
||||
<panel title="Logistique" colSpan="12">
|
||||
<field name="transmissionPoToSupplier" title="Date transmission BC au fournisseur" />
|
||||
<field name="forwardingPartner" form-view="partner-form" grid-view="partner-grid" title="Code transitaire"/>
|
||||
<field name="boardingDate" title="Date embarquement"/>
|
||||
<field name="arrivalGoodiDate" title="Date arrivee marchandise"/>
|
||||
<field name="arrivalDocDate" title="Date arrivee document"/>
|
||||
<field name="invoiceDirectDebitDate" title="Date domiciliation facture"/>
|
||||
</panel>
|
||||
|
||||
<panel title="Transit" colSpan="12">
|
||||
<field name="folderReceptionDate" title="Date reception dossier"/>
|
||||
<field name="arrivalNoticeDate" title="Date avis arrivee"/>
|
||||
<field name="liquidation_date" title="DATE DE LIQUIDATION" />
|
||||
<field name="clearanceStartDate" title="DATE DEBUT DEDOUANEMENT" />
|
||||
<field name="liquidation_date" title="DATE DE LIQUIDATION" />
|
||||
<field name="reception_sophal_date" title="ARRIVEE SOPHAL" />
|
||||
</panel>
|
||||
|
||||
</panel>
|
||||
<panel-tabs name="mainPanelTab">
|
||||
<panel-related name="purchaseOrderPanel" field="purchaseOrderList" form-grid="purchase-order-grid" form-view="purchase-order-form" />
|
||||
|
||||
<panel title="Description">
|
||||
<field name="notes" title="Notes" colSpan="12" widget="html" />
|
||||
</panel>
|
||||
<panel title="Shipping mode">
|
||||
<field name="shipmentMode" form-view="shipment-mode-form" grid-view="shipment-mode-grid" />
|
||||
<field name="freightCarrierMode" form-view="freight-carrier-mode-form" grid-view="freight-carrier-mode-grid" />
|
||||
<field name="freightCarrierMode" form-view="freight-carrier-mode-form" grid-view="freight-carrier-mode-grid" title="Mode de transport" />
|
||||
</panel>
|
||||
</panel-tabs>
|
||||
<panel name="actionsPanel" sidebar="true">
|
||||
<button name="draftBtn" title="Draft" onClick="save,action-importation-folder-record-draft,save" />
|
||||
<button name="openedBtn" title="Open" onClick="save,action-importation-folder-record-open,save" />
|
||||
<button name="closeBtn" title="Close" onClick="save,action-importation-folder-record-close,save" />
|
||||
<button name="prepareBtn" title="PREPARATION" onClick="save,action-importation-folder-record-preparation,save" />
|
||||
<button name="openedBtn" title="ENTAMÉ" onClick="save,action-importation-folder-record-entamee,save" />
|
||||
<button name="closeBtn" title="LOGISTIQUE" onClick="save,action-importation-folder-record-logistique,save" />
|
||||
<button name="closeBtn" title="TRANSIT" onClick="save,action-importation-folder-record-transit,save" />
|
||||
<button name="closeBtn" title="RECEPTION" onClick="save,action-importation-folder-record-reception,save" />
|
||||
<button name="cancelBtn" title="Cancel" class="danger" css="btn-danger" icon="fa-times" onClick="save,action-importation-folder-record-cancel,save" />
|
||||
</panel>
|
||||
<panel name="intaxTotalPanel" sidebar="true">
|
||||
<separator/>
|
||||
<field name="purchaseOrder" showTitle="false" colSpan="12" css="sub-order">
|
||||
<viewer depends="purchaseOrder">
|
||||
<![CDATA[
|
||||
<panel name="intaxTotalPanel" sidebar="true" readonly="true">
|
||||
<field name="purchaseOrderList" showTitle="false" colSpan="12">
|
||||
<viewer depends="exTaxTotal,currency.symbol,taxTotal,inTaxTotal"><![CDATA[
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{{record.purchaseOrderSeq }}</dt>
|
||||
<dt x-translate>Total W.T.</dt>
|
||||
<dd>{{record.exTaxTotal}} {{record.currency.symbol}}</dd>
|
||||
<dt x-translate>Total tax</dt>
|
||||
<dd>{{record.taxTotal}} {{record.currency.symbol}}</dd>
|
||||
<dt class="order-subtotal-total" x-translate>Total A.T.I.</dt>
|
||||
<dd class="order-subtotal-total">{{record.inTaxTotal}} {{record.currency.symbol}}</dd>
|
||||
<dt x-translate>Amount invoiced W.T.</dt>
|
||||
<dd>{{record.amountInvoiced}} {{record.currency.symbol}}</dd>
|
||||
</dl>
|
||||
]]>
|
||||
</viewer>
|
||||
</field>
|
||||
<field name="purchaseOrder.inTaxTotal" />
|
||||
<field name="purchaseOrder.currency.symbol" />
|
||||
</panel>
|
||||
|
||||
<panel sidebar="true">
|
||||
<field name="self" showTitle="false" readonly="true" >
|
||||
<viewer depends="amount,taxAmount,totalAmount">
|
||||
<![CDATA[
|
||||
<dl class="dl-horizontal">
|
||||
<dt x-translate>Total W.T.</dt>
|
||||
<dd>{{record.amount}} DZD</dd>
|
||||
<dt x-translate>Total tax</dt>
|
||||
<dd>{{record.taxAmount}} DZD</dd>
|
||||
<dt class="order-subtotal-total" x-translate>Total A.T.I.</dt>
|
||||
<dd class="order-subtotal-total">{{record.totalAmount}} DZD</dd>
|
||||
</dl>
|
||||
]]>
|
||||
</viewer>
|
||||
</field>
|
||||
|
||||
</panel>
|
||||
</panel>
|
||||
|
||||
<panel sidebar="true" title="Suivi" canCollapse="true" collapseIf="true">
|
||||
<field name="createdOn"/>
|
||||
<field name="createdBy"/>
|
||||
<field name="updatedOn"/>
|
||||
@@ -82,9 +125,9 @@
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<grid name="importation-folder-grid" title="Dossier d'importation" model="com.axelor.apps.purchase.db.ImportationFolder">
|
||||
<field name="importationFolderSeq"/>
|
||||
<field name="purchaseOrder"/>
|
||||
<field name="forwardingPartner"/>
|
||||
<field name="supplierPartner"/>
|
||||
<field name="containerNumber"/>
|
||||
|
||||
@@ -9,6 +9,13 @@
|
||||
<option value="1">Local</option>
|
||||
<option value="2">Etranger</option>
|
||||
</selection>
|
||||
|
||||
<selection name="purchase.importation.folder.priority.select">
|
||||
<option value="1">Faible</option>
|
||||
<option value="2">Moyen</option>
|
||||
<option value="3">Urgent</option>
|
||||
</selection>
|
||||
|
||||
<!-- Nomenclature : * name : "interfaceName" + "fieldName" + ".select" -->
|
||||
|
||||
<selection name="purchase.purchase.order.status.select">
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
<!-- Total T.T.C -->
|
||||
<decimal name="inTaxTotal" title="Total A.T.I." scale="2" precision="20" readonly="true"/>
|
||||
<many-to-one name="currency" ref="com.axelor.apps.base.db.Currency" title="Currency"/>
|
||||
|
||||
<many-to-one name="acceptedByUser" ref="com.axelor.auth.db.User" readonly="true" title="Accepted by"/>
|
||||
<date name="acceptanceDate" title="Acceptance date" readonly="true"/>
|
||||
<!-- sophal -->
|
||||
|
||||
<extra-code><![CDATA[
|
||||
|
||||
@@ -48,8 +48,12 @@ import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.persist.Transactional;
|
||||
|
||||
import wslite.json.JSONException;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.MalformedURLException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -336,7 +340,7 @@ public class PurchaseOrderServiceSupplychainImpl extends PurchaseOrderServiceImp
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public void validatePurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException {
|
||||
public void validatePurchaseOrder(PurchaseOrder purchaseOrder) throws AxelorException, MalformedURLException, JSONException {
|
||||
super.validatePurchaseOrder(purchaseOrder);
|
||||
|
||||
if (appSupplychainService.getAppSupplychain().getSupplierStockMoveGenerationAuto()
|
||||
|
||||
Reference in New Issue
Block a user