First commit waiting for Budget Alert
This commit is contained in:
@ -0,0 +1,109 @@
|
||||
/*
|
||||
* 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.contract.batch;
|
||||
|
||||
import com.axelor.apps.base.service.batch.BatchStrategy;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.repo.ContractBatchRepository;
|
||||
import com.axelor.apps.contract.db.repo.ContractRepository;
|
||||
import com.axelor.db.JPA;
|
||||
import com.axelor.db.Query;
|
||||
import com.axelor.exception.service.TraceBackService;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.inject.Inject;
|
||||
import java.util.List;
|
||||
|
||||
public class BatchContract extends BatchStrategy {
|
||||
|
||||
protected ContractRepository repository;
|
||||
|
||||
@Inject
|
||||
public BatchContract(ContractRepository repository) {
|
||||
this.repository = repository;
|
||||
}
|
||||
|
||||
public static BatchContractFactory getFactory(int action) {
|
||||
switch (action) {
|
||||
case ContractBatchRepository.INVOICING:
|
||||
return Beans.get(BatchContractFactoryInvoicing.class);
|
||||
case ContractBatchRepository.TERMINATE:
|
||||
return Beans.get(BatchContractFactoryTerminate.class);
|
||||
case ContractBatchRepository.NEXT_VERSION_ACTIVATION:
|
||||
return Beans.get(BatchContractFactoryNextActivation.class);
|
||||
case ContractBatchRepository.CURRENT_VERSION_ACTIVATION:
|
||||
return Beans.get(BatchContractFactoryCurrentActivation.class);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void process() {
|
||||
try {
|
||||
BatchContractFactory factory = getFactory(batch.getContractBatch().getActionSelect());
|
||||
Preconditions.checkNotNull(
|
||||
factory,
|
||||
String.format(
|
||||
I18n.get("Action %s has no Batch implementation."),
|
||||
batch.getContractBatch().getActionSelect()));
|
||||
|
||||
Query<Contract> query = factory.prepare(batch);
|
||||
List<Contract> contracts;
|
||||
|
||||
while (!(contracts = query.fetch(FETCH_LIMIT)).isEmpty()) {
|
||||
findBatch();
|
||||
for (Contract contract : contracts) {
|
||||
try {
|
||||
factory.process(contract);
|
||||
incrementDone(contract);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(e);
|
||||
incrementAnomaly(contract);
|
||||
}
|
||||
}
|
||||
JPA.clear();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(e);
|
||||
LOG.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
protected void incrementDone(Contract contract) {
|
||||
contract.addBatchSetItem(batch);
|
||||
super.incrementDone();
|
||||
}
|
||||
|
||||
protected void incrementAnomaly(Contract contract) {
|
||||
findBatch();
|
||||
contract = repository.find(contract.getId());
|
||||
contract.addBatchSetItem(batch);
|
||||
super.incrementAnomaly();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void stop() {
|
||||
super.stop();
|
||||
addComment(
|
||||
String.format(
|
||||
"%d contract(s) treated and %d anomaly(ies) reported !",
|
||||
batch.getDone(), batch.getAnomaly()));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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.contract.batch;
|
||||
|
||||
import com.axelor.apps.base.db.Batch;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.repo.ContractRepository;
|
||||
import com.axelor.apps.contract.service.ContractService;
|
||||
import com.axelor.db.Query;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
abstract class BatchContractFactory {
|
||||
ContractRepository repository;
|
||||
ContractService service;
|
||||
AppBaseService baseService;
|
||||
|
||||
@Inject
|
||||
public BatchContractFactory(
|
||||
ContractRepository repository, ContractService service, AppBaseService baseService) {
|
||||
this.repository = repository;
|
||||
this.service = service;
|
||||
this.baseService = baseService;
|
||||
}
|
||||
|
||||
abstract Query<Contract> prepare(Batch batch);
|
||||
|
||||
abstract void process(Contract contract) throws AxelorException;
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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.contract.batch;
|
||||
|
||||
import com.axelor.apps.base.db.Batch;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.repo.ContractRepository;
|
||||
import com.axelor.apps.contract.db.repo.ContractVersionRepository;
|
||||
import com.axelor.apps.contract.service.ContractService;
|
||||
import com.axelor.db.Query;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.google.inject.Inject;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
public class BatchContractFactoryCurrentActivation extends BatchContractFactory {
|
||||
|
||||
@Inject
|
||||
public BatchContractFactoryCurrentActivation(
|
||||
ContractRepository repository, ContractService service, AppBaseService baseService) {
|
||||
super(repository, service, baseService);
|
||||
}
|
||||
|
||||
@Override
|
||||
Query<Contract> prepare(Batch batch) {
|
||||
return repository
|
||||
.all()
|
||||
.filter(
|
||||
"self.currentContractVersion.supposedActivationDate <= :date "
|
||||
+ "AND self.currentContractVersion.statusSelect = :status "
|
||||
+ "AND :batch NOT MEMBER of self.batchSet")
|
||||
.bind("date", baseService.getTodayDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.bind("status", ContractVersionRepository.WAITING_VERSION)
|
||||
.bind("batch", batch);
|
||||
}
|
||||
|
||||
@Override
|
||||
void process(Contract contract) throws AxelorException {
|
||||
service.ongoingCurrentVersion(contract, baseService.getTodayDate());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* 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.contract.batch;
|
||||
|
||||
import com.axelor.apps.base.db.Batch;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.repo.ContractRepository;
|
||||
import com.axelor.apps.contract.service.ContractService;
|
||||
import com.axelor.db.Query;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.google.inject.Inject;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
public class BatchContractFactoryInvoicing extends BatchContractFactory {
|
||||
|
||||
@Inject
|
||||
public BatchContractFactoryInvoicing(
|
||||
ContractRepository repository, ContractService service, AppBaseService baseService) {
|
||||
super(repository, service, baseService);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Query<Contract> prepare(Batch batch) {
|
||||
return repository
|
||||
.all()
|
||||
.filter(
|
||||
"self.isInvoicingManagement = TRUE "
|
||||
+ "AND self.currentContractVersion.automaticInvoicing = TRUE "
|
||||
+ "AND self.invoicingDate <= :date "
|
||||
+ "AND :batch NOT MEMBER of self.batchSet")
|
||||
.bind("date", baseService.getTodayDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.bind("batch", batch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(Contract contract) throws AxelorException {
|
||||
service.invoicingContract(contract);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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.contract.batch;
|
||||
|
||||
import com.axelor.apps.base.db.Batch;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.repo.ContractRepository;
|
||||
import com.axelor.apps.contract.db.repo.ContractVersionRepository;
|
||||
import com.axelor.apps.contract.service.ContractService;
|
||||
import com.axelor.db.Query;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.google.inject.Inject;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
public class BatchContractFactoryNextActivation extends BatchContractFactory {
|
||||
|
||||
@Inject
|
||||
public BatchContractFactoryNextActivation(
|
||||
ContractRepository repository, ContractService service, AppBaseService baseService) {
|
||||
super(repository, service, baseService);
|
||||
}
|
||||
|
||||
@Override
|
||||
Query<Contract> prepare(Batch batch) {
|
||||
return repository
|
||||
.all()
|
||||
.filter(
|
||||
"self.nextVersion.supposedActivationDate <= :date "
|
||||
+ "AND self.nextVersion.statusSelect = :status "
|
||||
+ "AND :batch NOT MEMBER of self.batchSet")
|
||||
.bind("date", baseService.getTodayDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.bind("status", ContractVersionRepository.WAITING_VERSION)
|
||||
.bind("batch", batch);
|
||||
}
|
||||
|
||||
@Override
|
||||
void process(Contract contract) throws AxelorException {
|
||||
service.activeNextVersion(contract, baseService.getTodayDate());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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.contract.batch;
|
||||
|
||||
import com.axelor.apps.base.db.Batch;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.repo.ContractRepository;
|
||||
import com.axelor.apps.contract.service.ContractService;
|
||||
import com.axelor.db.Query;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.google.inject.Inject;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
public class BatchContractFactoryTerminate extends BatchContractFactory {
|
||||
|
||||
@Inject
|
||||
public BatchContractFactoryTerminate(
|
||||
ContractRepository repository, ContractService service, AppBaseService baseService) {
|
||||
super(repository, service, baseService);
|
||||
}
|
||||
|
||||
@Override
|
||||
Query<Contract> prepare(Batch batch) {
|
||||
return repository
|
||||
.all()
|
||||
.filter(
|
||||
"(self.terminatedDate <= :date "
|
||||
+ " OR self.currentContractVersion.supposedEndDate <= :date)"
|
||||
+ " AND self.statusSelect = :status"
|
||||
+ " AND :batch NOT MEMBER of self.batchSet")
|
||||
.bind("date", baseService.getTodayDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))
|
||||
.bind("status", ContractRepository.ACTIVE_CONTRACT)
|
||||
.bind("batch", batch);
|
||||
}
|
||||
|
||||
@Override
|
||||
void process(Contract contract) throws AxelorException {
|
||||
service.terminateContract(contract, false, baseService.getTodayDate());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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.contract.db.repo;
|
||||
|
||||
import com.axelor.apps.base.db.Company;
|
||||
import com.axelor.apps.base.service.administration.SequenceService;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.ContractVersion;
|
||||
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 ContractRepository extends AbstractContractRepository {
|
||||
@Override
|
||||
public Contract save(Contract contract) {
|
||||
try {
|
||||
if (contract.getContractId() == null) {
|
||||
contract.setContractId(computeSeq(contract.getCompany(), contract.getTargetTypeSelect()));
|
||||
}
|
||||
|
||||
ContractVersion currentContractVersion = contract.getCurrentContractVersion();
|
||||
currentContractVersion.setIsConsumptionManagement(contract.getIsConsumptionManagement());
|
||||
|
||||
return super.save(contract);
|
||||
} catch (Exception e) {
|
||||
throw new PersistenceException(e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public String computeSeq(Company company, int type) {
|
||||
try {
|
||||
String seq =
|
||||
Beans.get(SequenceService.class)
|
||||
.getSequenceNumber(
|
||||
type == 1 ? CUSTOMER_CONTRACT_SEQUENCE : SUPPLIER_CONTRACT_SEQUENCE, company);
|
||||
if (seq == null) {
|
||||
throw new AxelorException(
|
||||
String.format(
|
||||
I18n.get("The company %s doesn't have any configured sequence for contracts"),
|
||||
company.getName()),
|
||||
TraceBackRepository.CATEGORY_CONFIGURATION_ERROR);
|
||||
}
|
||||
return seq;
|
||||
} catch (Exception e) {
|
||||
throw new PersistenceException(e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Contract copy(Contract entity, boolean deep) {
|
||||
Contract contract = super.copy(entity, deep);
|
||||
ContractVersion version = Beans.get(ContractVersionRepository.class).copy(entity);
|
||||
contract.setCurrentContractVersion(version);
|
||||
return contract;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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.contract.db.repo;
|
||||
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.ContractLine;
|
||||
import com.axelor.apps.contract.db.ContractVersion;
|
||||
import com.axelor.apps.tool.ModelTool;
|
||||
import com.axelor.inject.Beans;
|
||||
import java.util.List;
|
||||
|
||||
public class ContractVersionRepository extends AbstractContractVersionRepository {
|
||||
|
||||
public ContractVersion copy(Contract contract) {
|
||||
ContractVersion newVersion = new ContractVersion();
|
||||
ContractVersion currentVersion = contract.getCurrentContractVersion();
|
||||
|
||||
newVersion.setStatusSelect(ContractVersionRepository.DRAFT_VERSION);
|
||||
newVersion.setNextContract(contract);
|
||||
newVersion.setPaymentMode(currentVersion.getPaymentMode());
|
||||
newVersion.setPaymentCondition(currentVersion.getPaymentCondition());
|
||||
newVersion.setInvoicingDuration(currentVersion.getInvoicingDuration());
|
||||
newVersion.setInvoicingMomentSelect(currentVersion.getInvoicingMomentSelect());
|
||||
newVersion.setIsPeriodicInvoicing(currentVersion.getIsPeriodicInvoicing());
|
||||
newVersion.setAutomaticInvoicing(currentVersion.getAutomaticInvoicing());
|
||||
newVersion.setIsProratedInvoice(currentVersion.getIsProratedInvoice());
|
||||
newVersion.setIsProratedFirstInvoice(currentVersion.getIsProratedFirstInvoice());
|
||||
newVersion.setIsProratedLastInvoice(currentVersion.getIsProratedLastInvoice());
|
||||
newVersion.setDescription(currentVersion.getDescription());
|
||||
|
||||
newVersion.setIsTacitRenewal(currentVersion.getIsTacitRenewal());
|
||||
newVersion.setRenewalDuration(currentVersion.getRenewalDuration());
|
||||
newVersion.setIsAutoEnableVersionOnRenew(currentVersion.getIsAutoEnableVersionOnRenew());
|
||||
|
||||
newVersion.setIsWithEngagement(currentVersion.getIsWithEngagement());
|
||||
newVersion.setEngagementDuration(currentVersion.getEngagementDuration());
|
||||
|
||||
newVersion.setIsWithPriorNotice(currentVersion.getIsWithPriorNotice());
|
||||
newVersion.setPriorNoticeDuration(currentVersion.getPriorNoticeDuration());
|
||||
|
||||
newVersion.setEngagementStartFromVersion(currentVersion.getEngagementStartFromVersion());
|
||||
|
||||
newVersion.setDoNotRenew(currentVersion.getDoNotRenew());
|
||||
|
||||
ContractLineRepository repository = Beans.get(ContractLineRepository.class);
|
||||
List<ContractLine> lines =
|
||||
ModelTool.copy(repository, currentVersion.getContractLineList(), false);
|
||||
newVersion.setContractLineList(lines);
|
||||
|
||||
newVersion.setIsTimeProratedInvoice(currentVersion.getIsTimeProratedInvoice());
|
||||
newVersion.setIsVersionProratedInvoice(currentVersion.getIsVersionProratedInvoice());
|
||||
|
||||
newVersion.setIsConsumptionBeforeEndDate(currentVersion.getIsConsumptionBeforeEndDate());
|
||||
newVersion.setIsConsumptionManagement(currentVersion.getIsConsumptionManagement());
|
||||
|
||||
return newVersion;
|
||||
}
|
||||
}
|
||||
@ -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.contract.exception;
|
||||
|
||||
public interface IExceptionMessage {
|
||||
|
||||
String CONTRACT_MISSING_TERMINATE_DATE = /*$$(*/
|
||||
"Please enter a terminated date for this version." /*)*/;
|
||||
String CONTRACT_MISSING_ENGAGEMENT_DATE = /*$$(*/ "Please enter a engagement date." /*)*/;
|
||||
String CONTRACT_ENGAGEMENT_DURATION_NOT_RESPECTED = /*$$(*/
|
||||
"Engagement duration is not fulfilled." /*)*/;
|
||||
String CONTRACT_PRIOR_DURATION_NOT_RESPECTED = /*$$(*/
|
||||
"Prior notice duration is not respected." /*)*/;
|
||||
String CONTRACT_UNVALIDE_TERMINATE_DATE = /*$$(*/
|
||||
"You cannot terminate a contract before version activation date." /*)*/;
|
||||
String CONTRACT_CANT_REMOVE_INVOICED_LINE = /*$$(*/
|
||||
"You cannot remove a line which has been already invoiced." /*)*/;
|
||||
String CONTRACT_EMPTY_PRODUCT = /*$$(*/ "The product can't be empty." /*)*/;
|
||||
String CONTRACT_MISSING_FROM_VERSION = /*$$(*/
|
||||
"There is no contract associated with this version." /*)*/;
|
||||
String CONTRACT_MISSING_FIRST_PERIOD = /*$$(*/
|
||||
"Please fill the first period end date and the invoice frequency." /*)*/;
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
/*
|
||||
* 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.contract.generator;
|
||||
|
||||
import com.axelor.apps.account.db.Invoice;
|
||||
import com.axelor.apps.account.db.repo.InvoiceRepository;
|
||||
import com.axelor.apps.account.service.invoice.generator.InvoiceGenerator;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.ContractVersion;
|
||||
import com.axelor.apps.contract.db.repo.ContractRepository;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.inject.Beans;
|
||||
|
||||
public class InvoiceGeneratorContract extends InvoiceGenerator {
|
||||
|
||||
protected Contract contract;
|
||||
private AppBaseService appBaseService;
|
||||
|
||||
public InvoiceGeneratorContract(Contract contract) throws AxelorException {
|
||||
super(
|
||||
contract.getTargetTypeSelect() == ContractRepository.CUSTOMER_CONTRACT
|
||||
? InvoiceRepository.OPERATION_TYPE_CLIENT_SALE
|
||||
: InvoiceRepository.OPERATION_TYPE_SUPPLIER_PURCHASE,
|
||||
contract.getCompany(),
|
||||
contract.getPartner(),
|
||||
null,
|
||||
null,
|
||||
contract.getContractId(),
|
||||
null,
|
||||
null,
|
||||
null);
|
||||
this.contract = contract;
|
||||
this.currency = contract.getCurrency();
|
||||
this.paymentCondition = contract.getCurrentContractVersion().getPaymentCondition();
|
||||
this.paymentMode = contract.getCurrentContractVersion().getPaymentMode();
|
||||
this.appBaseService = Beans.get(AppBaseService.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Invoice createInvoiceHeader() throws AxelorException {
|
||||
Invoice invoice = super.createInvoiceHeader();
|
||||
|
||||
ContractVersion version = contract.getCurrentContractVersion();
|
||||
if (contract.getIsInvoicingManagement() && version.getIsPeriodicInvoicing()) {
|
||||
invoice.setOperationSubTypeSelect(
|
||||
InvoiceRepository.OPERATION_SUB_TYPE_CONTRACT_PERIODIC_INVOICE);
|
||||
invoice.setSubscriptionFromDate(contract.getInvoicePeriodStartDate());
|
||||
invoice.setSubscriptionToDate(contract.getInvoicePeriodEndDate());
|
||||
} else if (contract.getEndDate() == null
|
||||
|| contract.getEndDate().isAfter(appBaseService.getTodayDate())) {
|
||||
invoice.setOperationSubTypeSelect(InvoiceRepository.OPERATION_SUB_TYPE_CONTRACT_INVOICE);
|
||||
} else {
|
||||
invoice.setOperationSubTypeSelect(
|
||||
InvoiceRepository.OPERATION_SUB_TYPE_CONTRACT_CLOSING_INVOICE);
|
||||
}
|
||||
|
||||
invoice.setContract(contract);
|
||||
if (contract.getInvoicingDate() != null) {
|
||||
invoice.setInvoiceDate(contract.getInvoicingDate());
|
||||
} else {
|
||||
invoice.setInvoiceDate(appBaseService.getTodayDate());
|
||||
}
|
||||
|
||||
invoice.setBankDetails(
|
||||
contract
|
||||
.getPartner()
|
||||
.getBankDetailsList()
|
||||
.stream()
|
||||
.filter(it -> it.getIsDefault())
|
||||
.findFirst()
|
||||
.orElse(null));
|
||||
|
||||
return invoice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Invoice generate() throws AxelorException {
|
||||
return createInvoiceHeader();
|
||||
}
|
||||
}
|
||||
@ -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.contract.module;
|
||||
|
||||
import com.axelor.app.AxelorModule;
|
||||
import com.axelor.apps.contract.db.repo.AbstractContractRepository;
|
||||
import com.axelor.apps.contract.db.repo.ContractRepository;
|
||||
import com.axelor.apps.contract.service.ConsumptionLineService;
|
||||
import com.axelor.apps.contract.service.ConsumptionLineServiceImpl;
|
||||
import com.axelor.apps.contract.service.ContractLineService;
|
||||
import com.axelor.apps.contract.service.ContractLineServiceImpl;
|
||||
import com.axelor.apps.contract.service.ContractService;
|
||||
import com.axelor.apps.contract.service.ContractServiceImpl;
|
||||
import com.axelor.apps.contract.service.ContractVersionService;
|
||||
import com.axelor.apps.contract.service.ContractVersionServiceImpl;
|
||||
|
||||
public class ContractModule extends AxelorModule {
|
||||
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(AbstractContractRepository.class).to(ContractRepository.class);
|
||||
bind(ContractService.class).to(ContractServiceImpl.class);
|
||||
bind(ContractVersionService.class).to(ContractVersionServiceImpl.class);
|
||||
bind(ContractLineService.class).to(ContractLineServiceImpl.class);
|
||||
bind(ConsumptionLineService.class).to(ConsumptionLineServiceImpl.class);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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.contract.service;
|
||||
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.contract.db.ConsumptionLine;
|
||||
|
||||
public interface ConsumptionLineService {
|
||||
|
||||
/**
|
||||
* Fill ConsumptionLine with Product information.
|
||||
*
|
||||
* @param line to fill.
|
||||
* @param product to get information.
|
||||
* @return ConsumptionLine filled with Product information.
|
||||
*/
|
||||
ConsumptionLine fill(ConsumptionLine line, Product product);
|
||||
}
|
||||
@ -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.contract.service;
|
||||
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.contract.db.ConsumptionLine;
|
||||
import com.axelor.apps.contract.exception.IExceptionMessage;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
public class ConsumptionLineServiceImpl implements ConsumptionLineService {
|
||||
|
||||
protected AppBaseService appBaseService;
|
||||
|
||||
@Inject
|
||||
public ConsumptionLineServiceImpl(AppBaseService appBaseService) {
|
||||
this.appBaseService = appBaseService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsumptionLine fill(ConsumptionLine line, Product product) {
|
||||
Preconditions.checkNotNull(product, I18n.get(IExceptionMessage.CONTRACT_EMPTY_PRODUCT));
|
||||
line.setLineDate(appBaseService.getTodayDate());
|
||||
line.setProduct(product);
|
||||
line.setReference(product.getName());
|
||||
line.setUnit(product.getUnit());
|
||||
return line;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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.contract.service;
|
||||
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.ContractLine;
|
||||
import com.axelor.exception.AxelorException;
|
||||
|
||||
public interface ContractLineService {
|
||||
/**
|
||||
* Set to null ContractLine fields for form view.
|
||||
*
|
||||
* @param contractLine to reset.
|
||||
* @return ContractLine reset.
|
||||
*/
|
||||
ContractLine reset(ContractLine contractLine);
|
||||
|
||||
/**
|
||||
* Fill ContractLine with Product information.
|
||||
*
|
||||
* @param contractLine to fill.
|
||||
* @param product to get information.
|
||||
* @return ContractLine filled with Product information.
|
||||
*/
|
||||
ContractLine fill(ContractLine contractLine, Product product);
|
||||
|
||||
/**
|
||||
* Compute price and tax of Product to ContractLine.
|
||||
*
|
||||
* @param contractLine to save price and tax.
|
||||
* @param contract to give additional information like Partner and Company.
|
||||
* @param product to use for computing.
|
||||
* @return ContractLine price and tax computed.
|
||||
* @throws AxelorException if a error occurred when we get tax line.
|
||||
*/
|
||||
ContractLine compute(ContractLine contractLine, Contract contract, Product product)
|
||||
throws AxelorException;
|
||||
|
||||
/**
|
||||
* Fill and compute ContractLine with Product.
|
||||
*
|
||||
* @param contractLine to fill and compute.
|
||||
* @param contract to give additional information.
|
||||
* @param product to use operation.
|
||||
* @return ContractLine filled and computed.
|
||||
* @throws AxelorException if a error occurred when we get tax line.
|
||||
*/
|
||||
ContractLine fillAndCompute(ContractLine contractLine, Contract contract, Product product)
|
||||
throws AxelorException;
|
||||
|
||||
/**
|
||||
* Compute ex and in tax total for ContractLine.
|
||||
*
|
||||
* @param contractLine to compute ex/in tax total.
|
||||
* @return ContractLine with ex/in tax total computed.
|
||||
*/
|
||||
ContractLine computeTotal(ContractLine contractLine);
|
||||
|
||||
/**
|
||||
* Create analytic move lines using analytic distribution template
|
||||
*
|
||||
* @param contractLine
|
||||
* @return ContractLine filled with analytic move lines
|
||||
*/
|
||||
ContractLine createAnalyticDistributionWithTemplate(ContractLine contractLine, Contract contract);
|
||||
}
|
||||
@ -0,0 +1,162 @@
|
||||
/*
|
||||
* 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.contract.service;
|
||||
|
||||
import com.axelor.apps.account.db.AnalyticMoveLine;
|
||||
import com.axelor.apps.account.db.TaxLine;
|
||||
import com.axelor.apps.account.db.repo.AnalyticMoveLineRepository;
|
||||
import com.axelor.apps.account.service.AnalyticMoveLineService;
|
||||
import com.axelor.apps.account.service.app.AppAccountService;
|
||||
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.base.service.tax.AccountManagementService;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.ContractLine;
|
||||
import com.axelor.apps.contract.exception.IExceptionMessage;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.inject.Inject;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.List;
|
||||
|
||||
public class ContractLineServiceImpl implements ContractLineService {
|
||||
protected AppBaseService appBaseService;
|
||||
protected AccountManagementService accountManagementService;
|
||||
protected CurrencyService currencyService;
|
||||
|
||||
@Inject
|
||||
public ContractLineServiceImpl(
|
||||
AppBaseService appBaseService,
|
||||
AccountManagementService accountManagementService,
|
||||
CurrencyService currencyService) {
|
||||
this.appBaseService = appBaseService;
|
||||
this.accountManagementService = accountManagementService;
|
||||
this.currencyService = currencyService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractLine reset(ContractLine contractLine) {
|
||||
if (contractLine == null) {
|
||||
return new ContractLine();
|
||||
}
|
||||
contractLine.setTaxLine(null);
|
||||
contractLine.setProductName(null);
|
||||
contractLine.setUnit(null);
|
||||
contractLine.setPrice(null);
|
||||
contractLine.setExTaxTotal(null);
|
||||
contractLine.setInTaxTotal(null);
|
||||
contractLine.setDescription(null);
|
||||
return contractLine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractLine fill(ContractLine contractLine, Product product) {
|
||||
Preconditions.checkNotNull(product, I18n.get(IExceptionMessage.CONTRACT_EMPTY_PRODUCT));
|
||||
contractLine.setProductName(product.getName());
|
||||
if (product.getSalesUnit() != null) {
|
||||
contractLine.setUnit(product.getSalesUnit());
|
||||
} else {
|
||||
contractLine.setUnit(product.getUnit());
|
||||
}
|
||||
contractLine.setPrice(product.getSalePrice());
|
||||
contractLine.setDescription(product.getDescription());
|
||||
return contractLine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractLine compute(ContractLine contractLine, Contract contract, Product product)
|
||||
throws AxelorException {
|
||||
Preconditions.checkNotNull(
|
||||
contract, I18n.get("Contract can't be " + "empty for compute contract line price."));
|
||||
Preconditions.checkNotNull(
|
||||
product, "Product can't be " + "empty for compute contract line price.");
|
||||
|
||||
// TODO: maybe put tax computing in another method
|
||||
contractLine.setFiscalPosition(contract.getPartner().getFiscalPosition());
|
||||
|
||||
TaxLine taxLine =
|
||||
accountManagementService.getTaxLine(
|
||||
appBaseService.getTodayDate(),
|
||||
product,
|
||||
contract.getCompany(),
|
||||
contractLine.getFiscalPosition(),
|
||||
false);
|
||||
contractLine.setTaxLine(taxLine);
|
||||
|
||||
if (taxLine != null && product.getInAti()) {
|
||||
BigDecimal price = contractLine.getPrice();
|
||||
price = price.divide(taxLine.getValue().add(BigDecimal.ONE), 2, BigDecimal.ROUND_HALF_UP);
|
||||
contractLine.setPrice(price);
|
||||
}
|
||||
|
||||
BigDecimal price = contractLine.getPrice();
|
||||
BigDecimal convert =
|
||||
currencyService.getCurrencyConversionRate(
|
||||
product.getSaleCurrency(), contract.getCurrency(), appBaseService.getTodayDate());
|
||||
contractLine.setPrice(price.multiply(convert));
|
||||
|
||||
return contractLine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractLine fillAndCompute(ContractLine contractLine, Contract contract, Product product)
|
||||
throws AxelorException {
|
||||
contractLine = fill(contractLine, product);
|
||||
contractLine = compute(contractLine, contract, product);
|
||||
return contractLine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractLine computeTotal(ContractLine contractLine) {
|
||||
BigDecimal taxRate = BigDecimal.ZERO;
|
||||
|
||||
if (contractLine.getTaxLine() != null) {
|
||||
taxRate = contractLine.getTaxLine().getValue();
|
||||
}
|
||||
|
||||
BigDecimal exTaxTotal =
|
||||
contractLine.getQty().multiply(contractLine.getPrice()).setScale(2, RoundingMode.HALF_EVEN);
|
||||
contractLine.setExTaxTotal(exTaxTotal);
|
||||
BigDecimal inTaxTotal = exTaxTotal.add(exTaxTotal.multiply(taxRate));
|
||||
contractLine.setInTaxTotal(inTaxTotal);
|
||||
|
||||
return contractLine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractLine createAnalyticDistributionWithTemplate(
|
||||
ContractLine contractLine, Contract contract) {
|
||||
|
||||
AppAccountService appAccountService = Beans.get(AppAccountService.class);
|
||||
|
||||
List<AnalyticMoveLine> analyticMoveLineList =
|
||||
Beans.get(AnalyticMoveLineService.class)
|
||||
.generateLines(
|
||||
contractLine.getAnalyticDistributionTemplate(),
|
||||
contractLine.getExTaxTotal(),
|
||||
AnalyticMoveLineRepository.STATUS_FORECAST_CONTRACT,
|
||||
appAccountService.getTodayDate());
|
||||
|
||||
contractLine.setAnalyticMoveLineList(analyticMoveLineList);
|
||||
return contractLine;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,176 @@
|
||||
/*
|
||||
* 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.contract.service;
|
||||
|
||||
import com.axelor.apps.account.db.Invoice;
|
||||
import com.axelor.apps.contract.db.ConsumptionLine;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.ContractLine;
|
||||
import com.axelor.apps.contract.db.ContractTemplate;
|
||||
import com.axelor.apps.contract.db.ContractVersion;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.inject.persist.Transactional;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public interface ContractService {
|
||||
|
||||
/**
|
||||
* Active the contract at the specific date.
|
||||
*
|
||||
* @param contract to active.
|
||||
* @param date to use for active contract.
|
||||
*/
|
||||
@Transactional
|
||||
void activeContract(Contract contract, LocalDate date);
|
||||
|
||||
/**
|
||||
* Waiting current version
|
||||
*
|
||||
* @param contract
|
||||
* @param date
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
void waitingCurrentVersion(Contract contract, LocalDate date) throws AxelorException;
|
||||
|
||||
/**
|
||||
* On going current version. It : - Active the contrat if not yet active - Set current version
|
||||
* ongoing - Inc version number
|
||||
*
|
||||
* @param contract
|
||||
* @param date
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
Invoice ongoingCurrentVersion(Contract contract, LocalDate date) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Waiting next version
|
||||
*
|
||||
* @param contract
|
||||
* @param date
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
void waitingNextVersion(Contract contract, LocalDate date) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Active the next version. It : - Terminate currentVersion - Archive current version - Ongoing
|
||||
* next version (now consider as current version)
|
||||
*
|
||||
* @param contract
|
||||
* @param date
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
void activeNextVersion(Contract contract, LocalDate date) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Archive the current version (moved to history) and move next version as current version
|
||||
*
|
||||
* @param contract
|
||||
* @param date
|
||||
*/
|
||||
@Transactional
|
||||
void archiveVersion(Contract contract, LocalDate date);
|
||||
|
||||
/**
|
||||
* Check if can terminate the contract.
|
||||
*
|
||||
* @param contract The contract to check.
|
||||
* @throws AxelorException Check condition failed.
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
void checkCanTerminateContract(Contract contract) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Terminate the contract
|
||||
*
|
||||
* @param contract
|
||||
* @param isManual
|
||||
* @param date
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
void terminateContract(Contract contract, Boolean isManual, LocalDate date)
|
||||
throws AxelorException;
|
||||
|
||||
/** Closes the contract */
|
||||
void close(Contract contract, LocalDate date);
|
||||
|
||||
/**
|
||||
* Invoicing the contract
|
||||
*
|
||||
* @param contract
|
||||
* @throws AxelorException
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
Invoice invoicingContract(Contract contract) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Renew a contract
|
||||
*
|
||||
* @param contract
|
||||
* @param date
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
void renewContract(Contract contract, LocalDate date) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Generate a new contract based on template
|
||||
*
|
||||
* @param template
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
Contract copyFromTemplate(Contract contract, ContractTemplate template) throws AxelorException;
|
||||
|
||||
Contract increaseInvoiceDates(Contract contract);
|
||||
|
||||
/**
|
||||
* Check if contract is valid, throws exceptions instead.
|
||||
*
|
||||
* @param contract to be check.
|
||||
* @throws AxelorException if the contract is invalid.
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
void isValid(Contract contract) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Take each consumption line and convert it to contract line if a associate consumption contract
|
||||
* line is present in contract.
|
||||
*
|
||||
* @param contract contain consumption and contract lines.
|
||||
* @return Multimap of consumption lines successfully converted to contract lines.
|
||||
*/
|
||||
Multimap<ContractLine, ConsumptionLine> mergeConsumptionLines(Contract contract);
|
||||
|
||||
default List<ContractVersion> getVersions(Contract contract) {
|
||||
List<ContractVersion> versions = contract.getVersionHistory();
|
||||
if (versions == null) {
|
||||
versions = new ArrayList<>();
|
||||
}
|
||||
if (contract.getCurrentContractVersion() != null) {
|
||||
versions.add(contract.getCurrentContractVersion());
|
||||
}
|
||||
return versions;
|
||||
}
|
||||
|
||||
default boolean isFullProrated(Contract contract) {
|
||||
return contract.getCurrentContractVersion() != null
|
||||
&& (contract.getCurrentContractVersion().getIsTimeProratedInvoice()
|
||||
&& contract.getCurrentContractVersion().getIsVersionProratedInvoice());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,740 @@
|
||||
/*
|
||||
* 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.contract.service;
|
||||
|
||||
import com.axelor.apps.account.db.Account;
|
||||
import com.axelor.apps.account.db.AnalyticMoveLine;
|
||||
import com.axelor.apps.account.db.FiscalPosition;
|
||||
import com.axelor.apps.account.db.Invoice;
|
||||
import com.axelor.apps.account.db.InvoiceLine;
|
||||
import com.axelor.apps.account.db.TaxLine;
|
||||
import com.axelor.apps.account.db.repo.AnalyticMoveLineRepository;
|
||||
import com.axelor.apps.account.db.repo.InvoiceLineRepository;
|
||||
import com.axelor.apps.account.db.repo.InvoiceRepository;
|
||||
import com.axelor.apps.account.service.FiscalPositionAccountService;
|
||||
import com.axelor.apps.account.service.invoice.InvoiceLineService;
|
||||
import com.axelor.apps.account.service.invoice.InvoiceService;
|
||||
import com.axelor.apps.account.service.invoice.InvoiceServiceImpl;
|
||||
import com.axelor.apps.account.service.invoice.generator.InvoiceGenerator;
|
||||
import com.axelor.apps.account.service.invoice.generator.InvoiceLineGenerator;
|
||||
import com.axelor.apps.base.db.repo.PriceListLineRepository;
|
||||
import com.axelor.apps.base.db.repo.PriceListRepository;
|
||||
import com.axelor.apps.base.service.DurationService;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.base.service.tax.AccountManagementService;
|
||||
import com.axelor.apps.contract.db.ConsumptionLine;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.ContractLine;
|
||||
import com.axelor.apps.contract.db.ContractTemplate;
|
||||
import com.axelor.apps.contract.db.ContractVersion;
|
||||
import com.axelor.apps.contract.db.repo.ConsumptionLineRepository;
|
||||
import com.axelor.apps.contract.db.repo.ContractLineRepository;
|
||||
import com.axelor.apps.contract.db.repo.ContractRepository;
|
||||
import com.axelor.apps.contract.db.repo.ContractVersionRepository;
|
||||
import com.axelor.apps.contract.exception.IExceptionMessage;
|
||||
import com.axelor.apps.contract.generator.InvoiceGeneratorContract;
|
||||
import com.axelor.apps.tool.date.DateTool;
|
||||
import com.axelor.auth.AuthUtils;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.exception.db.repo.TraceBackRepository;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.persist.Transactional;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ContractServiceImpl extends ContractRepository implements ContractService {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
// TODO: put this var in another place
|
||||
private static final int QTY_SCALE = 2;
|
||||
|
||||
protected AppBaseService appBaseService;
|
||||
protected ContractVersionService versionService;
|
||||
protected ContractLineService contractLineService;
|
||||
protected DurationService durationService;
|
||||
|
||||
protected ContractLineRepository contractLineRepo;
|
||||
protected ConsumptionLineRepository consumptionLineRepo;
|
||||
protected ContractRepository contractRepository;
|
||||
|
||||
@Inject
|
||||
public ContractServiceImpl(
|
||||
AppBaseService appBaseService,
|
||||
ContractVersionService versionService,
|
||||
ContractLineService contractLineService,
|
||||
DurationService durationService,
|
||||
ContractLineRepository contractLineRepo,
|
||||
ConsumptionLineRepository consumptionLineRepo,
|
||||
ContractRepository contractRepository) {
|
||||
this.appBaseService = appBaseService;
|
||||
this.versionService = versionService;
|
||||
this.contractLineService = contractLineService;
|
||||
this.durationService = durationService;
|
||||
this.contractLineRepo = contractLineRepo;
|
||||
this.consumptionLineRepo = consumptionLineRepo;
|
||||
this.contractRepository = contractRepository;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void activeContract(Contract contract, LocalDate date) {
|
||||
contract.setStartDate(date);
|
||||
contract.setStatusSelect(ACTIVE_CONTRACT);
|
||||
|
||||
save(contract);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public void waitingCurrentVersion(Contract contract, LocalDate date) throws AxelorException {
|
||||
ContractVersion currentVersion = contract.getCurrentContractVersion();
|
||||
versionService.waiting(currentVersion, date);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public Invoice ongoingCurrentVersion(Contract contract, LocalDate date) throws AxelorException {
|
||||
ContractVersion currentVersion = contract.getCurrentContractVersion();
|
||||
|
||||
if (currentVersion.getSupposedActivationDate() != null) {
|
||||
date = currentVersion.getSupposedActivationDate();
|
||||
}
|
||||
|
||||
Invoice invoice = null;
|
||||
|
||||
if (currentVersion.getIsWithEngagement()
|
||||
&& contract.getStatusSelect() != ContractRepository.ACTIVE_CONTRACT
|
||||
|| currentVersion.getEngagementStartFromVersion()) {
|
||||
contract.setEngagementStartDate(date);
|
||||
}
|
||||
|
||||
if (contract.getStatusSelect() != ContractRepository.ACTIVE_CONTRACT) {
|
||||
activeContract(contract, date);
|
||||
}
|
||||
|
||||
versionService.ongoing(currentVersion, date);
|
||||
|
||||
contract.setVersionNumber(contract.getVersionNumber() + 1);
|
||||
if (currentVersion.getIsPeriodicInvoicing() && contract.getVersionNumber() == 0) {
|
||||
contract.setInvoicePeriodStartDate(currentVersion.getActivationDate());
|
||||
contract.setInvoicePeriodEndDate(contract.getFirstPeriodEndDate());
|
||||
}
|
||||
if (contract.getCurrentContractVersion().getAutomaticInvoicing()) {
|
||||
if (contract.getCurrentContractVersion().getInvoicingMomentSelect()
|
||||
== ContractVersionRepository.BEGIN_INVOICING_MOMENT) {
|
||||
invoice = invoicingContract(contract);
|
||||
} else {
|
||||
fillInvoicingDateByInvoicingMoment(contract);
|
||||
}
|
||||
}
|
||||
|
||||
return invoice;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Contract increaseInvoiceDates(Contract contract) {
|
||||
ContractVersion version = contract.getCurrentContractVersion();
|
||||
if (version.getIsPeriodicInvoicing()) {
|
||||
contract.setInvoicePeriodStartDate(contract.getInvoicePeriodEndDate().plusDays(1));
|
||||
contract.setInvoicePeriodEndDate(
|
||||
durationService
|
||||
.computeDuration(version.getInvoicingDuration(), contract.getInvoicePeriodStartDate())
|
||||
.minusDays(1));
|
||||
}
|
||||
|
||||
fillInvoicingDateByInvoicingMoment(contract);
|
||||
|
||||
return contract;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
private void fillInvoicingDateByInvoicingMoment(Contract contract) {
|
||||
ContractVersion version = contract.getCurrentContractVersion();
|
||||
if (version.getAutomaticInvoicing()) {
|
||||
switch (version.getInvoicingMomentSelect()) {
|
||||
case ContractVersionRepository.END_INVOICING_MOMENT:
|
||||
contract.setInvoicingDate(contract.getInvoicePeriodEndDate());
|
||||
break;
|
||||
case ContractVersionRepository.BEGIN_INVOICING_MOMENT:
|
||||
contract.setInvoicingDate(contract.getInvoicePeriodStartDate());
|
||||
break;
|
||||
case ContractVersionRepository.END_INVOICING_MOMENT_PLUS:
|
||||
if (contract.getInvoicePeriodEndDate() != null) {
|
||||
contract.setInvoicingDate(
|
||||
contract.getInvoicePeriodEndDate().plusDays(version.getNumberOfDays()));
|
||||
}
|
||||
break;
|
||||
case ContractVersionRepository.BEGIN_INVOICING_MOMENT_PLUS:
|
||||
if (contract.getInvoicePeriodStartDate() != null) {
|
||||
contract.setInvoicingDate(
|
||||
contract.getInvoicePeriodStartDate().plusDays(version.getNumberOfDays()));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
contract.setInvoicingDate(appBaseService.getTodayDate());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void isValid(Contract contract) throws AxelorException {
|
||||
if (contract.getId() == null) {
|
||||
return;
|
||||
}
|
||||
checkInvoicedConsumptionLines(contract);
|
||||
checkInvoicedAdditionalContractLine(contract);
|
||||
}
|
||||
|
||||
protected void checkInvoicedConsumptionLines(Contract contract) throws AxelorException {
|
||||
Contract origin = find(contract.getId());
|
||||
List<ConsumptionLine> lineInvoiced =
|
||||
origin
|
||||
.getConsumptionLineList()
|
||||
.stream()
|
||||
.filter(ConsumptionLine::getIsInvoiced)
|
||||
.collect(Collectors.toList());
|
||||
for (ConsumptionLine line : contract.getConsumptionLineList()) {
|
||||
if (lineInvoiced.contains(line)) {
|
||||
lineInvoiced.remove(line);
|
||||
}
|
||||
}
|
||||
if (!lineInvoiced.isEmpty()) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.TYPE_FUNCTIONNAL,
|
||||
I18n.get(IExceptionMessage.CONTRACT_CANT_REMOVE_INVOICED_LINE));
|
||||
}
|
||||
}
|
||||
|
||||
protected void checkInvoicedAdditionalContractLine(Contract contract) throws AxelorException {
|
||||
Contract origin = find(contract.getId());
|
||||
List<ContractLine> lineInvoiced =
|
||||
origin
|
||||
.getAdditionalBenefitContractLineList()
|
||||
.stream()
|
||||
.filter(ContractLine::getIsInvoiced)
|
||||
.collect(Collectors.toList());
|
||||
for (ContractLine line : contract.getAdditionalBenefitContractLineList()) {
|
||||
if (lineInvoiced.contains(line)) {
|
||||
lineInvoiced.remove(line);
|
||||
}
|
||||
}
|
||||
if (!lineInvoiced.isEmpty()) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.TYPE_FUNCTIONNAL,
|
||||
I18n.get(IExceptionMessage.CONTRACT_CANT_REMOVE_INVOICED_LINE));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public void waitingNextVersion(Contract contract, LocalDate date) throws AxelorException {
|
||||
ContractVersion version = contract.getNextVersion();
|
||||
versionService.waiting(version, date);
|
||||
|
||||
save(contract);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public void activeNextVersion(Contract contract, LocalDate date) throws AxelorException {
|
||||
ContractVersion currentVersion = contract.getCurrentContractVersion();
|
||||
|
||||
// Terminate currentVersion
|
||||
versionService.terminate(currentVersion, date.minusDays(1));
|
||||
|
||||
// Archive current version
|
||||
archiveVersion(contract, date);
|
||||
|
||||
if (contract.getCurrentContractVersion().getDoNotRenew()) {
|
||||
contract.getCurrentContractVersion().setIsTacitRenewal(false);
|
||||
}
|
||||
|
||||
// Ongoing current version
|
||||
ongoingCurrentVersion(contract, date);
|
||||
|
||||
save(contract);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void archiveVersion(Contract contract, LocalDate date) {
|
||||
ContractVersion currentVersion = contract.getCurrentContractVersion();
|
||||
ContractVersion nextVersion = contract.getNextVersion();
|
||||
|
||||
contract.addVersionHistory(currentVersion);
|
||||
currentVersion.setContract(null);
|
||||
|
||||
contract.setCurrentContractVersion(nextVersion);
|
||||
nextVersion.setNextContract(null);
|
||||
nextVersion.setContract(contract);
|
||||
|
||||
contract.setNextVersion(null);
|
||||
|
||||
save(contract);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkCanTerminateContract(Contract contract) throws AxelorException {
|
||||
if (contract.getTerminatedDate() == null) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_MISSING_FIELD,
|
||||
I18n.get(IExceptionMessage.CONTRACT_MISSING_TERMINATE_DATE));
|
||||
}
|
||||
ContractVersion version = contract.getCurrentContractVersion();
|
||||
|
||||
if (contract.getTerminatedDate().isBefore(version.getActivationDate())) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.TYPE_FUNCTIONNAL,
|
||||
I18n.get(IExceptionMessage.CONTRACT_UNVALIDE_TERMINATE_DATE));
|
||||
}
|
||||
|
||||
if (version.getIsWithEngagement()) {
|
||||
if (contract.getEngagementStartDate() == null) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_MISSING_FIELD,
|
||||
I18n.get(IExceptionMessage.CONTRACT_MISSING_ENGAGEMENT_DATE));
|
||||
}
|
||||
if (contract
|
||||
.getTerminatedDate()
|
||||
.isBefore(
|
||||
durationService.computeDuration(
|
||||
version.getEngagementDuration(), contract.getEngagementStartDate()))) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.TYPE_FUNCTIONNAL,
|
||||
I18n.get(IExceptionMessage.CONTRACT_ENGAGEMENT_DURATION_NOT_RESPECTED));
|
||||
}
|
||||
}
|
||||
|
||||
if (version.getIsWithPriorNotice()
|
||||
&& contract
|
||||
.getTerminatedDate()
|
||||
.isBefore(
|
||||
durationService.computeDuration(
|
||||
version.getPriorNoticeDuration(),
|
||||
Beans.get(AppBaseService.class).getTodayDate()))) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.TYPE_FUNCTIONNAL,
|
||||
I18n.get(IExceptionMessage.CONTRACT_PRIOR_DURATION_NOT_RESPECTED));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public void terminateContract(Contract contract, Boolean isManual, LocalDate date)
|
||||
throws AxelorException {
|
||||
ContractVersion currentVersion = contract.getCurrentContractVersion();
|
||||
|
||||
if (currentVersion.getIsTacitRenewal() && !currentVersion.getDoNotRenew()) {
|
||||
renewContract(contract, date);
|
||||
return;
|
||||
}
|
||||
|
||||
contract.setTerminatedManually(isManual);
|
||||
contract.setTerminatedDate(date);
|
||||
if (isManual) {
|
||||
contract.setTerminationDemandDate(appBaseService.getTodayDate());
|
||||
contract.setTerminatedByUser(AuthUtils.getUser());
|
||||
}
|
||||
contract.setEndDate(date);
|
||||
|
||||
close(contract, date);
|
||||
|
||||
save(contract);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void close(Contract contract, LocalDate terminationDate) {
|
||||
LocalDate today = appBaseService.getTodayDate();
|
||||
|
||||
ContractVersion currentVersion = contract.getCurrentContractVersion();
|
||||
|
||||
if (terminationDate.isBefore(today) || terminationDate.equals(today)) {
|
||||
versionService.terminate(currentVersion, terminationDate);
|
||||
contract.setStatusSelect(CLOSED_CONTRACT);
|
||||
}
|
||||
|
||||
save(contract);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public Invoice invoicingContract(Contract contract) throws AxelorException {
|
||||
Invoice invoice = generateInvoice(contract);
|
||||
InvoiceRepository invoiceRepository = Beans.get(InvoiceRepository.class);
|
||||
invoiceRepository.save(invoice);
|
||||
|
||||
// Compute all additional lines
|
||||
List<ContractLine> additionalLines =
|
||||
contract
|
||||
.getAdditionalBenefitContractLineList()
|
||||
.stream()
|
||||
.filter(contractLine -> !contractLine.getIsInvoiced())
|
||||
.peek(contractLine -> contractLine.setIsInvoiced(true))
|
||||
.collect(Collectors.toList());
|
||||
for (ContractLine line : additionalLines) {
|
||||
generate(invoice, line);
|
||||
contractLineRepo.save(line);
|
||||
}
|
||||
|
||||
// Compute all classic contract lines
|
||||
for (ContractVersion version : getVersions(contract)) {
|
||||
BigDecimal ratio = BigDecimal.ONE;
|
||||
if (contract.getCurrentContractVersion().getIsTimeProratedInvoice()) {
|
||||
if (isFullProrated(contract)
|
||||
&& !DateTool.isProrata(
|
||||
contract.getInvoicePeriodStartDate(),
|
||||
contract.getInvoicePeriodEndDate(),
|
||||
version.getActivationDate(),
|
||||
version.getEndDate())) {
|
||||
continue;
|
||||
}
|
||||
LocalDate start =
|
||||
version.getActivationDate().isBefore(contract.getInvoicePeriodStartDate())
|
||||
? contract.getInvoicePeriodStartDate()
|
||||
: version.getActivationDate();
|
||||
LocalDate end =
|
||||
version.getEndDate() == null
|
||||
|| (version.getEndDate() != null
|
||||
&& contract.getInvoicePeriodEndDate().isBefore(version.getEndDate()))
|
||||
? contract.getInvoicePeriodEndDate()
|
||||
: version.getEndDate();
|
||||
ratio =
|
||||
durationService.computeRatio(
|
||||
start, end, contract.getCurrentContractVersion().getInvoicingDuration());
|
||||
}
|
||||
List<ContractLine> lines =
|
||||
version
|
||||
.getContractLineList()
|
||||
.stream()
|
||||
.filter(contractLine -> !contractLine.getIsConsumptionLine())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
for (ContractLine line : lines) {
|
||||
ContractLine tmp = contractLineRepo.copy(line, false);
|
||||
tmp.setAnalyticMoveLineList(line.getAnalyticMoveLineList());
|
||||
tmp.setQty(tmp.getQty().multiply(ratio).setScale(QTY_SCALE, RoundingMode.HALF_UP));
|
||||
tmp = this.contractLineService.computeTotal(tmp);
|
||||
generate(invoice, tmp);
|
||||
}
|
||||
}
|
||||
|
||||
// Compute all consumption lines
|
||||
Multimap<ContractLine, ConsumptionLine> consLines = mergeConsumptionLines(contract);
|
||||
for (Entry<ContractLine, Collection<ConsumptionLine>> entries : consLines.asMap().entrySet()) {
|
||||
ContractLine line = entries.getKey();
|
||||
InvoiceLine invoiceLine = generate(invoice, line);
|
||||
entries
|
||||
.getValue()
|
||||
.stream()
|
||||
.peek(cons -> cons.setInvoiceLine(invoiceLine))
|
||||
.forEach(cons -> cons.setIsInvoiced(true));
|
||||
line.setQty(BigDecimal.ZERO);
|
||||
contractLineService.computeTotal(line);
|
||||
}
|
||||
|
||||
// Compute invoice
|
||||
if (invoice.getInvoiceLineList() != null && !invoice.getInvoiceLineList().isEmpty()) {
|
||||
Beans.get(InvoiceServiceImpl.class).compute(invoice);
|
||||
}
|
||||
|
||||
// Increase invoice period date
|
||||
increaseInvoiceDates(contract);
|
||||
|
||||
return invoiceRepository.save(invoice);
|
||||
}
|
||||
|
||||
public Invoice generateInvoice(Contract contract) throws AxelorException {
|
||||
InvoiceGenerator invoiceGenerator = new InvoiceGeneratorContract(contract);
|
||||
Invoice invoice = invoiceGenerator.generate();
|
||||
|
||||
return invoice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Multimap<ContractLine, ConsumptionLine> mergeConsumptionLines(Contract contract) {
|
||||
Multimap<ContractLine, ConsumptionLine> mergedLines = HashMultimap.create();
|
||||
|
||||
Stream<ConsumptionLine> lineStream =
|
||||
contract.getConsumptionLineList().stream().filter(c -> !c.getIsInvoiced());
|
||||
|
||||
if (contract.getCurrentContractVersion().getIsConsumptionBeforeEndDate()) {
|
||||
lineStream =
|
||||
lineStream.filter(
|
||||
line -> line.getLineDate().isBefore(contract.getInvoicePeriodEndDate()));
|
||||
}
|
||||
|
||||
lineStream.forEach(
|
||||
line -> {
|
||||
ContractVersion version = contract.getCurrentContractVersion();
|
||||
|
||||
if (isFullProrated(contract)) {
|
||||
version = versionService.getContractVersion(contract, line.getLineDate());
|
||||
}
|
||||
|
||||
if (version == null) {
|
||||
line.setIsError(true);
|
||||
} else {
|
||||
ContractLine matchLine =
|
||||
contractLineRepo.findOneBy(version, line.getProduct(), line.getReference(), true);
|
||||
if (matchLine == null) {
|
||||
line.setIsError(true);
|
||||
} else {
|
||||
matchLine.setQty(matchLine.getQty().add(line.getQty()));
|
||||
contractLineService.computeTotal(matchLine);
|
||||
line.setIsError(false);
|
||||
line.setContractLine(matchLine);
|
||||
mergedLines.put(matchLine, line);
|
||||
}
|
||||
}
|
||||
});
|
||||
return mergedLines;
|
||||
}
|
||||
|
||||
InvoiceLineService invoiceLineService = Beans.get(InvoiceLineService.class);
|
||||
|
||||
public InvoiceLine generate(Invoice invoice, ContractLine line) throws AxelorException {
|
||||
InvoiceLineGenerator invoiceLineGenerator =
|
||||
new InvoiceLineGenerator(
|
||||
invoice,
|
||||
line.getProduct(),
|
||||
line.getProductName(),
|
||||
line.getPrice(),
|
||||
invoiceLineService.convertUnitPrice(false, line.getTaxLine(), line.getPrice()),
|
||||
null,
|
||||
line.getDescription(),
|
||||
line.getQty(),
|
||||
line.getUnit(),
|
||||
line.getTaxLine(),
|
||||
line.getSequence(),
|
||||
BigDecimal.ZERO,
|
||||
PriceListLineRepository.AMOUNT_TYPE_NONE,
|
||||
line.getExTaxTotal(),
|
||||
line.getInTaxTotal(),
|
||||
false,
|
||||
false,
|
||||
0) {
|
||||
@Override
|
||||
public List<InvoiceLine> creates() throws AxelorException {
|
||||
InvoiceLine invoiceLine = this.createInvoiceLine();
|
||||
|
||||
List<InvoiceLine> invoiceLines = new ArrayList<>();
|
||||
invoiceLines.add(invoiceLine);
|
||||
return invoiceLines;
|
||||
}
|
||||
};
|
||||
|
||||
InvoiceLine invoiceLine = invoiceLineGenerator.creates().get(0);
|
||||
|
||||
FiscalPositionAccountService fiscalPositionAccountService =
|
||||
Beans.get(FiscalPositionAccountService.class);
|
||||
FiscalPosition fiscalPosition = line.getFiscalPosition();
|
||||
Account currentAccount = invoiceLine.getAccount();
|
||||
Account replacedAccount =
|
||||
fiscalPositionAccountService.getAccount(fiscalPosition, currentAccount);
|
||||
|
||||
boolean isPurchase =
|
||||
Beans.get(InvoiceService.class).getPurchaseTypeOrSaleType(invoice)
|
||||
== PriceListRepository.TYPE_PURCHASE;
|
||||
|
||||
TaxLine taxLine =
|
||||
Beans.get(AccountManagementService.class)
|
||||
.getTaxLine(
|
||||
appBaseService.getTodayDate(),
|
||||
invoiceLine.getProduct(),
|
||||
invoice.getCompany(),
|
||||
fiscalPosition,
|
||||
isPurchase);
|
||||
|
||||
invoiceLine.setTaxLine(taxLine);
|
||||
invoiceLine.setAccount(replacedAccount);
|
||||
|
||||
if (line.getAnalyticDistributionTemplate() != null) {
|
||||
invoiceLine.setAnalyticDistributionTemplate(line.getAnalyticDistributionTemplate());
|
||||
this.copyAnalyticMoveLines(line.getAnalyticMoveLineList(), invoiceLine);
|
||||
}
|
||||
|
||||
invoice.addInvoiceLineListItem(invoiceLine);
|
||||
|
||||
return Beans.get(InvoiceLineRepository.class).save(invoiceLine);
|
||||
}
|
||||
|
||||
public void copyAnalyticMoveLines(
|
||||
List<AnalyticMoveLine> originalAnalyticMoveLineList, InvoiceLine invoiceLine) {
|
||||
if (originalAnalyticMoveLineList == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
AnalyticMoveLineRepository analyticMoveLineRepo = Beans.get(AnalyticMoveLineRepository.class);
|
||||
|
||||
for (AnalyticMoveLine originalAnalyticMoveLine : originalAnalyticMoveLineList) {
|
||||
AnalyticMoveLine analyticMoveLine =
|
||||
analyticMoveLineRepo.copy(originalAnalyticMoveLine, false);
|
||||
|
||||
analyticMoveLine.setTypeSelect(AnalyticMoveLineRepository.STATUS_FORECAST_INVOICE);
|
||||
analyticMoveLine.setContractLine(null);
|
||||
invoiceLine.addAnalyticMoveLineListItem(analyticMoveLine);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public void renewContract(Contract contract, LocalDate date) throws AxelorException {
|
||||
|
||||
ContractVersion currentVersion = contract.getCurrentContractVersion();
|
||||
ContractVersion nextVersion =
|
||||
Beans.get(ContractVersionRepository.class).copy(currentVersion, true);
|
||||
|
||||
versionService.terminate(currentVersion, date.minusDays(1));
|
||||
|
||||
contract.addVersionHistory(currentVersion);
|
||||
currentVersion.setContract(null);
|
||||
|
||||
contract.setCurrentContractVersion(nextVersion);
|
||||
nextVersion.setNextContract(null);
|
||||
nextVersion.setContract(contract);
|
||||
if (nextVersion.getIsTacitRenewal()) {
|
||||
nextVersion.setSupposedEndDate(
|
||||
durationService.computeDuration(nextVersion.getRenewalDuration(), date));
|
||||
}
|
||||
if (nextVersion.getIsAutoEnableVersionOnRenew()) {
|
||||
versionService.ongoing(nextVersion, date);
|
||||
} else {
|
||||
versionService.waiting(nextVersion, date);
|
||||
}
|
||||
|
||||
contract.setLastRenewalDate(date);
|
||||
contract.setRenewalNumber(contract.getRenewalNumber() + 1);
|
||||
|
||||
save(contract);
|
||||
}
|
||||
|
||||
public List<Contract> getContractToTerminate(LocalDate date) {
|
||||
return all()
|
||||
.filter(
|
||||
"self.statusSelect = ?1 AND self.currentContractVersion.statusSelect = ?2 AND self.isTacitRenewal IS FALSE "
|
||||
+ "AND (self.toClosed IS TRUE OR self.currentContractVersion.supposedEndDate >= ?3)",
|
||||
ACTIVE_CONTRACT,
|
||||
ContractVersionRepository.ONGOING_VERSION,
|
||||
date)
|
||||
.fetch();
|
||||
}
|
||||
|
||||
public List<Contract> getContractToRenew(LocalDate date) {
|
||||
return all()
|
||||
.filter(
|
||||
"self.statusSelect = ?1 AND self.isTacitRenewal IS TRUE AND self.toClosed IS FALSE "
|
||||
+ "AND self.currentContractVersion.statusSelect = ?2 AND self.currentContractVersion.supposedEndDate >= ?3",
|
||||
ACTIVE_CONTRACT,
|
||||
ContractVersionRepository.ONGOING_VERSION,
|
||||
date)
|
||||
.fetch();
|
||||
}
|
||||
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public Contract copyFromTemplate(Contract contract, ContractTemplate template)
|
||||
throws AxelorException {
|
||||
|
||||
if (template.getAdditionalBenefitContractLineList() != null
|
||||
&& !template.getAdditionalBenefitContractLineList().isEmpty()) {
|
||||
|
||||
for (ContractLine line : template.getAdditionalBenefitContractLineList()) {
|
||||
|
||||
ContractLine newLine = contractLineRepo.copy(line, false);
|
||||
contractLineService.compute(newLine, contract, newLine.getProduct());
|
||||
contractLineService.computeTotal(newLine);
|
||||
contractLineRepo.save(newLine);
|
||||
contract.addAdditionalBenefitContractLineListItem(newLine);
|
||||
}
|
||||
}
|
||||
|
||||
contract.setCompany(template.getCompany());
|
||||
contract.setCurrency(template.getCurrency());
|
||||
contract.setIsAdditionaBenefitManagement(template.getIsAdditionaBenefitManagement());
|
||||
contract.setIsConsumptionManagement(template.getIsConsumptionManagement());
|
||||
contract.setIsInvoicingManagement(template.getIsInvoicingManagement());
|
||||
contract.setName(template.getName());
|
||||
contract.setNote(template.getNote());
|
||||
|
||||
ContractVersion version = new ContractVersion();
|
||||
|
||||
if (template.getContractLineList() != null && !template.getContractLineList().isEmpty()) {
|
||||
|
||||
for (ContractLine line : template.getContractLineList()) {
|
||||
|
||||
ContractLine newLine = contractLineRepo.copy(line, false);
|
||||
contractLineService.compute(newLine, contract, newLine.getProduct());
|
||||
contractLineService.computeTotal(newLine);
|
||||
contractLineRepo.save(newLine);
|
||||
version.addContractLineListItem(newLine);
|
||||
}
|
||||
}
|
||||
|
||||
version.setIsConsumptionBeforeEndDate(template.getIsConsumptionBeforeEndDate());
|
||||
version.setIsPeriodicInvoicing(template.getIsPeriodicInvoicing());
|
||||
version.setIsProratedFirstInvoice(template.getIsProratedFirstInvoice());
|
||||
version.setIsProratedInvoice(template.getIsProratedInvoice());
|
||||
version.setIsProratedLastInvoice(template.getIsProratedLastInvoice());
|
||||
version.setIsTacitRenewal(template.getIsTacitRenewal());
|
||||
version.setIsTimeProratedInvoice(template.getIsTimeProratedInvoice());
|
||||
version.setIsVersionProratedInvoice(template.getIsVersionProratedInvoice());
|
||||
version.setIsWithEngagement(template.getIsWithEngagement());
|
||||
version.setIsWithPriorNotice(template.getIsWithPriorNotice());
|
||||
version.setIsAutoEnableVersionOnRenew(template.getIsAutoEnableVersionOnRenew());
|
||||
|
||||
version.setAutomaticInvoicing(template.getAutomaticInvoicing());
|
||||
version.setEngagementDuration(template.getEngagementDuration());
|
||||
version.setEngagementStartFromVersion(template.getEngagementStartFromVersion());
|
||||
version.setInvoicingDuration(template.getInvoicingDuration());
|
||||
version.setInvoicingMomentSelect(template.getInvoicingMomentSelect());
|
||||
version.setPaymentCondition(template.getPaymentCondition());
|
||||
version.setPaymentMode(template.getPaymentMode());
|
||||
version.setPriorNoticeDuration(template.getPriorNoticeDuration());
|
||||
version.setRenewalDuration(template.getRenewalDuration());
|
||||
version.setDescription(template.getDescription());
|
||||
|
||||
contract.setCurrentContractVersion(version);
|
||||
|
||||
return contract;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ContractVersion> getVersions(Contract contract) {
|
||||
if (contract.getCurrentContractVersion() == null || isFullProrated(contract)) {
|
||||
return ContractService.super.getVersions(contract);
|
||||
} else {
|
||||
return Collections.singletonList(contract.getCurrentContractVersion());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
/*
|
||||
* 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.contract.service;
|
||||
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.ContractVersion;
|
||||
import com.axelor.apps.tool.date.DateTool;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.google.inject.persist.Transactional;
|
||||
import java.time.LocalDate;
|
||||
|
||||
public interface ContractVersionService {
|
||||
|
||||
/**
|
||||
* Waiting version at the today date.
|
||||
*
|
||||
* @param version of the contract will be waiting.
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
void waiting(ContractVersion version) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Waiting version at the specific date.
|
||||
*
|
||||
* @param version of the contract will be waiting.
|
||||
* @param date of waiting.
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
void waiting(ContractVersion version, LocalDate date) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Ongoing version at the today date.
|
||||
*
|
||||
* @param version of te contract will be ongoing.
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
void ongoing(ContractVersion version) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Ongoing version at the specific date.
|
||||
*
|
||||
* @param version of the contract will be ongoing.
|
||||
* @param date of activation.
|
||||
*/
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
void ongoing(ContractVersion version, LocalDate date) throws AxelorException;
|
||||
|
||||
/**
|
||||
* Terminate version at the today date.
|
||||
*
|
||||
* @param version of the contract will be terminate.
|
||||
*/
|
||||
@Transactional
|
||||
void terminate(ContractVersion version);
|
||||
|
||||
/**
|
||||
* Terminate version at the specific date.
|
||||
*
|
||||
* @param version of the contract will be terminate.
|
||||
* @param date of terminate.
|
||||
*/
|
||||
@Transactional
|
||||
void terminate(ContractVersion version, LocalDate date);
|
||||
|
||||
/**
|
||||
* Create new version from contract but don't save it. There will be use for set values from form
|
||||
* view.
|
||||
*
|
||||
* @param contract for use the actual version as base.
|
||||
* @return the copy a contract's actual version.
|
||||
*/
|
||||
ContractVersion newDraft(Contract contract);
|
||||
|
||||
default ContractVersion getContractVersion(Contract contract, LocalDate date) {
|
||||
for (ContractVersion version : contract.getVersionHistory()) {
|
||||
if (version.getActivationDate() == null || version.getEndDate() == null) {
|
||||
continue;
|
||||
}
|
||||
if (DateTool.isBetween(version.getActivationDate(), version.getEndDate(), date)) {
|
||||
return version;
|
||||
}
|
||||
}
|
||||
ContractVersion version = contract.getCurrentContractVersion();
|
||||
if (DateTool.isBetween(version.getActivationDate(), version.getEndDate(), date)) {
|
||||
return version;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,125 @@
|
||||
/*
|
||||
* 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.contract.service;
|
||||
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.ContractVersion;
|
||||
import com.axelor.apps.contract.db.repo.ContractVersionRepository;
|
||||
import com.axelor.apps.contract.exception.IExceptionMessage;
|
||||
import com.axelor.auth.AuthUtils;
|
||||
import com.axelor.exception.AxelorException;
|
||||
import com.axelor.exception.db.repo.TraceBackRepository;
|
||||
import com.axelor.i18n.I18n;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.persist.Transactional;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class ContractVersionServiceImpl extends ContractVersionRepository
|
||||
implements ContractVersionService {
|
||||
|
||||
protected AppBaseService appBaseService;
|
||||
|
||||
@Inject
|
||||
public ContractVersionServiceImpl(AppBaseService appBaseService) {
|
||||
this.appBaseService = appBaseService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void waiting(ContractVersion version) throws AxelorException {
|
||||
waiting(version, appBaseService.getTodayDate());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public void waiting(ContractVersion version, LocalDate date) throws AxelorException {
|
||||
|
||||
Contract contract =
|
||||
Stream.of(version.getContract(), version.getNextContract())
|
||||
.filter(Objects::nonNull)
|
||||
.findFirst()
|
||||
.orElseThrow(
|
||||
() ->
|
||||
new AxelorException(
|
||||
TraceBackRepository.CATEGORY_MISSING_FIELD,
|
||||
I18n.get(IExceptionMessage.CONTRACT_MISSING_FROM_VERSION)));
|
||||
|
||||
if (contract.getIsInvoicingManagement()
|
||||
&& version.getIsPeriodicInvoicing()
|
||||
&& (contract.getFirstPeriodEndDate() == null || version.getInvoicingDuration() == null)) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_CONFIGURATION_ERROR,
|
||||
I18n.get(IExceptionMessage.CONTRACT_MISSING_FIRST_PERIOD));
|
||||
}
|
||||
version.setStatusSelect(WAITING_VERSION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ongoing(ContractVersion version) throws AxelorException {
|
||||
ongoing(version, appBaseService.getTodayDate());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackOn = {Exception.class})
|
||||
public void ongoing(ContractVersion version, LocalDate date) throws AxelorException {
|
||||
version.setActivationDate(date);
|
||||
version.setActivatedByUser(AuthUtils.getUser());
|
||||
version.setStatusSelect(ONGOING_VERSION);
|
||||
|
||||
if (version.getVersion() >= 0
|
||||
&& version.getIsWithEngagement()
|
||||
&& version.getEngagementStartFromVersion()) {
|
||||
Preconditions.checkNotNull(
|
||||
version.getContract(), I18n.get("No contract is associated to version."));
|
||||
version.getContract().setEngagementStartDate(date);
|
||||
}
|
||||
|
||||
if (version.getContract().getIsInvoicingManagement()
|
||||
&& version.getIsPeriodicInvoicing()
|
||||
&& (version.getContract().getFirstPeriodEndDate() == null
|
||||
|| version.getInvoicingDuration() == null)) {
|
||||
throw new AxelorException(
|
||||
TraceBackRepository.CATEGORY_CONFIGURATION_ERROR,
|
||||
I18n.get("Please fill the first period end date and the invoice frequency."));
|
||||
}
|
||||
|
||||
save(version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void terminate(ContractVersion version) {
|
||||
terminate(version, appBaseService.getTodayDate());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void terminate(ContractVersion version, LocalDate date) {
|
||||
version.setEndDate(date);
|
||||
version.setStatusSelect(TERMINATED_VERSION);
|
||||
|
||||
save(version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractVersion newDraft(Contract contract) {
|
||||
return copy(contract);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* 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.contract.translation;
|
||||
|
||||
public interface ITranslation {
|
||||
|
||||
public static final String CONTRACT_APP_NAME = /*$$(*/ "value:Contract"; /*)*/
|
||||
}
|
||||
@ -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.contract.web;
|
||||
|
||||
import com.axelor.apps.contract.db.ConsumptionLine;
|
||||
import com.axelor.apps.contract.service.ConsumptionLineService;
|
||||
import com.axelor.exception.service.TraceBackService;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
|
||||
public class ConsumptionLineController {
|
||||
|
||||
public void changeProduct(ActionRequest request, ActionResponse response) {
|
||||
ConsumptionLine line = request.getContext().asType(ConsumptionLine.class);
|
||||
try {
|
||||
Beans.get(ConsumptionLineService.class).fill(line, line.getProduct());
|
||||
response.setValues(line);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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.contract.web;
|
||||
|
||||
import com.axelor.apps.base.db.Batch;
|
||||
import com.axelor.apps.contract.batch.BatchContract;
|
||||
import com.axelor.apps.contract.db.ContractBatch;
|
||||
import com.axelor.apps.contract.db.repo.ContractBatchRepository;
|
||||
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 ContractBatchController {
|
||||
|
||||
public void runBatch(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
ContractBatch contractBatch = request.getContext().asType(ContractBatch.class);
|
||||
contractBatch = Beans.get(ContractBatchRepository.class).find(contractBatch.getId());
|
||||
Batch batch = Beans.get(BatchContract.class).run(contractBatch);
|
||||
response.setFlash(batch.getComments());
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,246 @@
|
||||
/*
|
||||
* 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.contract.web;
|
||||
|
||||
import com.axelor.apps.account.db.Invoice;
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.ContractLine;
|
||||
import com.axelor.apps.contract.db.ContractTemplate;
|
||||
import com.axelor.apps.contract.db.ContractVersion;
|
||||
import com.axelor.apps.contract.db.repo.ContractRepository;
|
||||
import com.axelor.apps.contract.db.repo.ContractTemplateRepository;
|
||||
import com.axelor.apps.contract.db.repo.ContractVersionRepository;
|
||||
import com.axelor.apps.contract.service.ContractLineService;
|
||||
import com.axelor.apps.contract.service.ContractService;
|
||||
import com.axelor.apps.tool.ModelTool;
|
||||
import com.axelor.db.JPA;
|
||||
import com.axelor.exception.ResponseMessageType;
|
||||
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.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.google.inject.Singleton;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Singleton
|
||||
public class ContractController {
|
||||
|
||||
public void waiting(ActionRequest request, ActionResponse response) {
|
||||
Contract contract =
|
||||
Beans.get(ContractRepository.class)
|
||||
.find(request.getContext().asType(Contract.class).getId());
|
||||
try {
|
||||
Beans.get(ContractService.class).waitingCurrentVersion(contract, getTodayDate());
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void ongoing(ActionRequest request, ActionResponse response) {
|
||||
Contract contract =
|
||||
Beans.get(ContractRepository.class)
|
||||
.find(request.getContext().asType(Contract.class).getId());
|
||||
try {
|
||||
Invoice invoice =
|
||||
Beans.get(ContractService.class).ongoingCurrentVersion(contract, getTodayDate());
|
||||
if (invoice == null) {
|
||||
response.setReload(true);
|
||||
} else {
|
||||
response.setView(
|
||||
ActionView.define(I18n.get("Invoice"))
|
||||
.model(Invoice.class.getName())
|
||||
.add("form", "invoice-form")
|
||||
.add("grid", "invoice-grid")
|
||||
.param("forceTitle", "true")
|
||||
.context("_showRecord", invoice.getId().toString())
|
||||
.map());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void invoicing(ActionRequest request, ActionResponse response) {
|
||||
Contract contract =
|
||||
Beans.get(ContractRepository.class)
|
||||
.find(request.getContext().asType(Contract.class).getId());
|
||||
try {
|
||||
Invoice invoice = Beans.get(ContractService.class).invoicingContract(contract);
|
||||
response.setReload(true);
|
||||
response.setView(
|
||||
ActionView.define(I18n.get("Invoice"))
|
||||
.model(Invoice.class.getName())
|
||||
.add("form", "invoice-form")
|
||||
.add("grid", "invoice-grid")
|
||||
.param("forceTitle", "true")
|
||||
.context("_showRecord", invoice.getId().toString())
|
||||
.map());
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void terminated(ActionRequest request, ActionResponse response) {
|
||||
Contract contract =
|
||||
Beans.get(ContractRepository.class)
|
||||
.find(request.getContext().asType(Contract.class).getId());
|
||||
try {
|
||||
ContractService service = Beans.get(ContractService.class);
|
||||
service.checkCanTerminateContract(contract);
|
||||
service.terminateContract(contract, true, contract.getTerminatedDate());
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void close(ActionRequest request, ActionResponse response) {
|
||||
Contract contract =
|
||||
Beans.get(ContractRepository.class)
|
||||
.find(request.getContext().asType(Contract.class).getId());
|
||||
|
||||
ContractService service = Beans.get(ContractService.class);
|
||||
try {
|
||||
service.checkCanTerminateContract(contract);
|
||||
service.close(contract, contract.getTerminatedDate());
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void renew(ActionRequest request, ActionResponse response) {
|
||||
Contract contract =
|
||||
Beans.get(ContractRepository.class)
|
||||
.find(request.getContext().asType(Contract.class).getId());
|
||||
try {
|
||||
Beans.get(ContractService.class).renewContract(contract, getTodayDate());
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteNextVersion(ActionRequest request, ActionResponse response) {
|
||||
final Contract contract =
|
||||
JPA.find(Contract.class, request.getContext().asType(Contract.class).getId());
|
||||
|
||||
// TODO: move this code in Service
|
||||
JPA.runInTransaction(
|
||||
new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
ContractVersion version = contract.getNextVersion();
|
||||
contract.setNextVersion(null);
|
||||
Beans.get(ContractVersionRepository.class).remove(version);
|
||||
Beans.get(ContractRepository.class).save(contract);
|
||||
}
|
||||
});
|
||||
|
||||
response.setReload(true);
|
||||
}
|
||||
|
||||
public void saveNextVersion(ActionRequest request, ActionResponse response) {
|
||||
final ContractVersion version =
|
||||
JPA.find(ContractVersion.class, request.getContext().asType(ContractVersion.class).getId());
|
||||
if (version.getNextContract() != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Object xContractId = request.getContext().get("_xContractId");
|
||||
Long contractId;
|
||||
|
||||
if (xContractId != null) {
|
||||
contractId = Long.valueOf(xContractId.toString());
|
||||
} else if (version.getContract() != null) {
|
||||
contractId = version.getContract().getId();
|
||||
} else {
|
||||
contractId = null;
|
||||
}
|
||||
|
||||
if (contractId == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
JPA.runInTransaction(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Contract contract = JPA.find(Contract.class, contractId);
|
||||
contract.setNextVersion(version);
|
||||
Beans.get(ContractRepository.class).save(contract);
|
||||
}
|
||||
});
|
||||
|
||||
response.setReload(true);
|
||||
}
|
||||
|
||||
public void copyFromTemplate(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
ContractTemplate template =
|
||||
ModelTool.toBean(ContractTemplate.class, request.getContext().get("contractTemplate"));
|
||||
template = Beans.get(ContractTemplateRepository.class).find(template.getId());
|
||||
|
||||
Contract contract =
|
||||
Beans.get(ContractRepository.class)
|
||||
.find(request.getContext().asType(Contract.class).getId());
|
||||
Beans.get(ContractService.class).copyFromTemplate(contract, template);
|
||||
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e, ResponseMessageType.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
public void changeProduct(ActionRequest request, ActionResponse response) {
|
||||
ContractLineService contractLineService = Beans.get(ContractLineService.class);
|
||||
ContractLine contractLine = new ContractLine();
|
||||
|
||||
try {
|
||||
contractLine = request.getContext().asType(ContractLine.class);
|
||||
|
||||
Contract contract = request.getContext().getParent().asType(Contract.class);
|
||||
Product product = contractLine.getProduct();
|
||||
|
||||
contractLine = contractLineService.fillAndCompute(contractLine, contract, product);
|
||||
response.setValues(contractLine);
|
||||
} catch (Exception e) {
|
||||
response.setValues(contractLineService.reset(contractLine));
|
||||
}
|
||||
}
|
||||
|
||||
private LocalDate getTodayDate() {
|
||||
return Beans.get(AppBaseService.class).getTodayDate();
|
||||
}
|
||||
|
||||
public void isValid(ActionRequest request, ActionResponse response) {
|
||||
Contract contract = request.getContext().asType(Contract.class);
|
||||
|
||||
try {
|
||||
Beans.get(ContractService.class).isValid(contract);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e, ResponseMessageType.ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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.contract.web;
|
||||
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.ContractLine;
|
||||
import com.axelor.apps.contract.service.ContractLineService;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.axelor.rpc.Context;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
@Singleton
|
||||
public class ContractLineController {
|
||||
|
||||
public void computeTotal(ActionRequest request, ActionResponse response) {
|
||||
ContractLine contractLine = request.getContext().asType(ContractLine.class);
|
||||
ContractLineService contractLineService = Beans.get(ContractLineService.class);
|
||||
|
||||
try {
|
||||
contractLine = contractLineService.computeTotal(contractLine);
|
||||
response.setValues(contractLine);
|
||||
} catch (Exception e) {
|
||||
response.setValues(contractLineService.reset(contractLine));
|
||||
}
|
||||
}
|
||||
|
||||
public void createAnalyticDistributionWithTemplate(
|
||||
ActionRequest request, ActionResponse response) {
|
||||
ContractLine contractLine = request.getContext().asType(ContractLine.class);
|
||||
Context parentContext = request.getContext().getParent();
|
||||
Contract contract = null;
|
||||
|
||||
if (parentContext.get("_model").equals(Contract.class.getCanonicalName())) {
|
||||
contract = parentContext.asType(Contract.class);
|
||||
} else if (parentContext.getParent() != null
|
||||
&& parentContext.getParent().get("_model").equals(Contract.class.getCanonicalName())) {
|
||||
contract = parentContext.getParent().asType(Contract.class);
|
||||
}
|
||||
|
||||
contractLine =
|
||||
Beans.get(ContractLineService.class)
|
||||
.createAnalyticDistributionWithTemplate(contractLine, contract);
|
||||
response.setValue("analyticMoveLineList", contractLine.getAnalyticMoveLineList());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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.contract.web;
|
||||
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.contract.db.ContractLine;
|
||||
import com.axelor.apps.contract.service.ContractLineService;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
@Singleton
|
||||
public class ContractTemplateController {
|
||||
|
||||
public void changeProduct(ActionRequest request, ActionResponse response) {
|
||||
ContractLineService contractLineService = Beans.get(ContractLineService.class);
|
||||
ContractLine contractLine = new ContractLine();
|
||||
|
||||
try {
|
||||
contractLine = request.getContext().asType(ContractLine.class);
|
||||
Product product = contractLine.getProduct();
|
||||
contractLine = contractLineService.fill(contractLine, product);
|
||||
|
||||
response.setValues(contractLine);
|
||||
} catch (Exception e) {
|
||||
response.setValues(contractLineService.reset(contractLine));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,138 @@
|
||||
/*
|
||||
* 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.contract.web;
|
||||
|
||||
import com.axelor.apps.base.db.Product;
|
||||
import com.axelor.apps.base.service.app.AppBaseService;
|
||||
import com.axelor.apps.contract.db.Contract;
|
||||
import com.axelor.apps.contract.db.ContractLine;
|
||||
import com.axelor.apps.contract.db.ContractVersion;
|
||||
import com.axelor.apps.contract.db.repo.ContractRepository;
|
||||
import com.axelor.apps.contract.db.repo.ContractVersionRepository;
|
||||
import com.axelor.apps.contract.service.ContractLineService;
|
||||
import com.axelor.apps.contract.service.ContractService;
|
||||
import com.axelor.apps.contract.service.ContractVersionService;
|
||||
import com.axelor.db.JPA;
|
||||
import com.axelor.db.mapper.Mapper;
|
||||
import com.axelor.exception.service.TraceBackService;
|
||||
import com.axelor.inject.Beans;
|
||||
import com.axelor.meta.schema.actions.ActionView;
|
||||
import com.axelor.rpc.ActionRequest;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.google.inject.Singleton;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Singleton
|
||||
public class ContractVersionController {
|
||||
|
||||
public void newDraft(ActionRequest request, ActionResponse response) {
|
||||
Long contractId = Long.valueOf(request.getContext().get("_xContractId").toString());
|
||||
Contract contract = Beans.get(ContractRepository.class).find(contractId);
|
||||
ContractVersion newVersion = Beans.get(ContractVersionService.class).newDraft(contract);
|
||||
response.setValues(Mapper.toMap(newVersion));
|
||||
}
|
||||
|
||||
public void save(ActionRequest request, ActionResponse response) {
|
||||
final ContractVersion version =
|
||||
JPA.find(ContractVersion.class, request.getContext().asType(ContractVersion.class).getId());
|
||||
if (version.getNextContract() != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Object xContractId = request.getContext().get("_xContractId");
|
||||
Long contractId;
|
||||
|
||||
if (xContractId != null) {
|
||||
contractId = Long.valueOf(xContractId.toString());
|
||||
} else if (version.getContract() != null) {
|
||||
contractId = version.getContract().getId();
|
||||
} else {
|
||||
contractId = null;
|
||||
}
|
||||
|
||||
if (contractId == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: move in service
|
||||
JPA.runInTransaction(
|
||||
() -> {
|
||||
Contract contract = JPA.find(Contract.class, contractId);
|
||||
contract.setNextVersion(version);
|
||||
Beans.get(ContractRepository.class).save(contract);
|
||||
});
|
||||
|
||||
response.setReload(true);
|
||||
}
|
||||
|
||||
public void active(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
Long id = request.getContext().asType(ContractVersion.class).getId();
|
||||
ContractVersion contractVersion = Beans.get(ContractVersionRepository.class).find(id);
|
||||
Beans.get(ContractService.class)
|
||||
.activeNextVersion(contractVersion.getNextContract(), getTodayDate());
|
||||
response.setView(
|
||||
ActionView.define("Contract")
|
||||
.model(Contract.class.getName())
|
||||
.add("form", "contract-form")
|
||||
.add("grid", "contract-grid")
|
||||
.context("_showRecord", contractVersion.getContract().getId())
|
||||
.map());
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void waiting(ActionRequest request, ActionResponse response) {
|
||||
try {
|
||||
Long id = request.getContext().asType(ContractVersion.class).getId();
|
||||
ContractVersion contractVersion = Beans.get(ContractVersionRepository.class).find(id);
|
||||
Beans.get(ContractService.class)
|
||||
.waitingNextVersion(contractVersion.getNextContract(), getTodayDate());
|
||||
response.setReload(true);
|
||||
} catch (Exception e) {
|
||||
TraceBackService.trace(response, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void changeProduct(ActionRequest request, ActionResponse response) {
|
||||
ContractLineService contractLineService = Beans.get(ContractLineService.class);
|
||||
ContractLine contractLine = new ContractLine();
|
||||
|
||||
try {
|
||||
contractLine = request.getContext().asType(ContractLine.class);
|
||||
|
||||
ContractVersion contractVersion =
|
||||
request.getContext().getParent().asType(ContractVersion.class);
|
||||
Contract contract =
|
||||
contractVersion.getNextContract() == null
|
||||
? contractVersion.getContract()
|
||||
: contractVersion.getNextContract();
|
||||
Product product = contractLine.getProduct();
|
||||
|
||||
contractLine = contractLineService.fillAndCompute(contractLine, contract, product);
|
||||
response.setValues(contractLine);
|
||||
} catch (Exception e) {
|
||||
response.setValues(contractLineService.reset(contractLine));
|
||||
}
|
||||
}
|
||||
|
||||
private LocalDate getTodayDate() {
|
||||
return Beans.get(AppBaseService.class).getTodayDate();
|
||||
}
|
||||
}
|
||||
@ -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,3 @@
|
||||
"importId";"code";"name";"nextNum";"padding";"prefixe";"suffixe";"toBeAdded";"yearlyResetOk"
|
||||
9991;"customerContract";"Customer Contracts";1;4;"C";;1;0
|
||||
9992;"supplierContract";"Supplier Contracts";1;4;"S";;1;0
|
||||
|
@ -0,0 +1,3 @@
|
||||
"importId";"code";"name";"nextNum";"padding";"prefixe";"suffixe";"toBeAdded";"yearlyResetOk"
|
||||
9991;"customerContract";"Customer Contracts";1;4;"C";;1;0
|
||||
9992;"supplierContract";"Supplier Contracts";1;4;"S";;1;0
|
||||
|
@ -0,0 +1,20 @@
|
||||
<?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_appContract.csv" separator=";" type="com.axelor.apps.base.db.AppContract" 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_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.contract.all";"com.axelor.apps.contract.db.*";"x";"x";"x";"x";"x";;;"Admin"
|
||||
|
@ -0,0 +1,2 @@
|
||||
"name";"code";"installOrder";"description";"imagePath";"modules";"dependsOn";"sequence"
|
||||
"Contract";"contract";25;"Contract configuration";"app-contract.png";"axelor-contract";"account,purchase,sale";10
|
||||
|
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
@ -0,0 +1,8 @@
|
||||
"name";"roles.name"
|
||||
"contracts-root";"Admin"
|
||||
"contracts-root-customer-all";"Admin"
|
||||
"contracts-root-supplier-all";"Admin"
|
||||
"contracts-root-conf-all";"Admin"
|
||||
"contracts-root-conf-terminated";"Admin"
|
||||
"contract-template-all";"Admin"
|
||||
"duration-all";"Admin"
|
||||
|
@ -0,0 +1,16 @@
|
||||
<?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_appContract.csv" separator=";" type="com.axelor.apps.base.db.AppContract" search="self.code = :code" update="true" />
|
||||
|
||||
<input file="base_sequence.csv" separator=";" type="com.axelor.apps.base.db.Sequence" search="self.importId = :importId" call="com.axelor.csv.script.SequenceScript:computeFullname">
|
||||
<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"/>
|
||||
</input>
|
||||
|
||||
<input file="contract_contractTemplate.csv" separator=";" type="com.axelor.apps.contract.db.ContractTemplate" search="self.importId = :importId"/>
|
||||
|
||||
</csv-inputs>
|
||||
@ -0,0 +1,2 @@
|
||||
"code";"isUnchangableContract";"isAmendmentManagement";"isRenewalManagement";"isInvoicingManagement";"isConsumptionManagement";"isAdditionalBenefitManagement";"isConfigContract"
|
||||
"contract";"true";"true";"true";"true";"true";"true";"true"
|
||||
|
@ -0,0 +1,3 @@
|
||||
"importId";"company.importId"
|
||||
9991;1
|
||||
9992;1
|
||||
|
@ -0,0 +1,2 @@
|
||||
"importId";"name";"note";"engagementStartFromVersion";"importOrigin";"invoicingDuration.importId";"description";"isProratedInvoice";"isWithPriorNotice";"isProratedFirstInvoice";"firstPeriodEndDate";"automaticInvoicing";"archived";"renewalDuration.importId";"invoicingMomentSelect";"isWithEngagement";"company.importId";"currency.code";"targetTypeSelect";"isTacitRenewal";"isConsumptionBeforeEndDate";"isConsumptionManagement";"isTimeProratedInvoice";"isAdditionaBenefitManagement";"isInvoicingManagement";"priorNoticeDuration.importId";"isVersionProratedInvoice";"periodNumber";"isPeriodicInvoicing";"paymentCondition.importId";"paymentMode.importId";"isAutoEnableVersionOnRenew";"engagementDuration.importId";"isProratedLastInvoice"
|
||||
1;"Hébergement IT toutes options";;"false";;1;;"false";"false";"false";;"true";;3;1;"true";1;"EUR";1;"true";"true";"true";"true";"true";"true";2;"true";0;"true";5;13;"true";1;"false"
|
||||
|
@ -0,0 +1,2 @@
|
||||
"code";"isUnchangableContract";"isAmendmentManagement";"isRenewalManagement";"isInvoicingManagement";"isConsumptionManagement";"isAdditionalBenefitManagement";"isConfigContract"
|
||||
"contract";"true";"true";"true";"true";"true";"true";"true"
|
||||
|
@ -0,0 +1,3 @@
|
||||
"importId";"company.importId"
|
||||
9991;1
|
||||
9992;1
|
||||
|
@ -0,0 +1,2 @@
|
||||
"importId";"name";"note";"engagementStartFromVersion";"importOrigin";"invoicingDuration.importId";"description";"isProratedInvoice";"isWithPriorNotice";"isProratedFirstInvoice";"firstPeriodEndDate";"automaticInvoicing";"archived";"renewalDuration.importId";"invoicingMomentSelect";"isWithEngagement";"company.importId";"currency.code";"targetTypeSelect";"isTacitRenewal";"isConsumptionBeforeEndDate";"isConsumptionManagement";"isTimeProratedInvoice";"isAdditionaBenefitManagement";"isInvoicingManagement";"priorNoticeDuration.importId";"isVersionProratedInvoice";"periodNumber";"isPeriodicInvoicing";"paymentCondition.importId";"paymentMode.importId";"isAutoEnableVersionOnRenew";"engagementDuration.importId";"isProratedLastInvoice"
|
||||
1;"Hébergement IT toutes options";;"false";;1;;"false";"false";"false";;"true";;3;1;"true";1;"EUR";1;"true";"true";"true";"true";"true";"true";2;"true";0;"true";5;13;"true";1;"false"
|
||||
|
@ -0,0 +1,19 @@
|
||||
<?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="AnalyticMoveLine" lang="java">
|
||||
|
||||
<many-to-one name="contractLine" ref="com.axelor.apps.contract.db.ContractLine"/>
|
||||
|
||||
<extra-code><![CDATA[
|
||||
|
||||
// STATUS SELECT
|
||||
public static final int STATUS_FORECAST_CONTRACT = 4;
|
||||
|
||||
]]></extra-code>
|
||||
|
||||
</entity>
|
||||
</domain-models>
|
||||
@ -0,0 +1,30 @@
|
||||
<?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="AppContract" lang="java" extends="App">
|
||||
|
||||
<boolean name="isUnchangableContract" title="Unchangable contract" />
|
||||
<boolean name="isAmendmentManagement" title="Amendment management" />
|
||||
<boolean name="isRenewalManagement" title="Renewal management" />
|
||||
|
||||
<boolean name="isInvoicingManagement" title="Invoicing management" />
|
||||
<boolean name="isConsumptionManagement" title="Consumption management" />
|
||||
<boolean name="isAdditionalBenefitManagement" title="Additional Benefit Management" />
|
||||
|
||||
<boolean name="isConfigContract" title="Configurable contract" />
|
||||
|
||||
<track>
|
||||
<field name="isUnchangableContract" on="UPDATE"/>
|
||||
<field name="isAmendmentManagement" on="UPDATE"/>
|
||||
<field name="isRenewalManagement" on="UPDATE"/>
|
||||
<field name="isInvoicingManagement" on="UPDATE"/>
|
||||
<field name="isConsumptionManagement" on="UPDATE"/>
|
||||
<field name="isAdditionalBenefitManagement" on="UPDATE"/>
|
||||
<field name="isConfigContract" on="UPDATE"/>
|
||||
</track>
|
||||
</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="base" package="com.axelor.apps.base.db"/>
|
||||
|
||||
<entity name="Batch" lang="java" sequential="true">
|
||||
<!-- NOT DISPLAY -->
|
||||
<many-to-one name="contractBatch" ref="com.axelor.apps.contract.db.ContractBatch" />
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,34 @@
|
||||
<?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="contract" package="com.axelor.apps.contract.db" />
|
||||
|
||||
<entity name="ConsumptionLine" >
|
||||
|
||||
<decimal name="qty" title="Quantity"/>
|
||||
<many-to-one name="product" ref="com.axelor.apps.base.db.Product" title="Product" required="true"/>
|
||||
<many-to-one name="unit" ref="com.axelor.apps.base.db.Unit" title="Unit"/>
|
||||
<date name="lineDate" title="Date" />
|
||||
<boolean name="isInvoiced" title="Invoiced" />
|
||||
<boolean name="isError" title="Error" />
|
||||
<string name="reference" title="Reference" />
|
||||
<many-to-one name="contractLine" ref="com.axelor.apps.contract.db.ContractLine" title="Contract line" />
|
||||
<many-to-one name="invoiceLine" ref="com.axelor.apps.account.db.InvoiceLine" title="Invoice line" />
|
||||
|
||||
<string name="fullName" namecolumn="true">
|
||||
<![CDATA[
|
||||
String fullName = "";
|
||||
if(product != null && product.getName() != null) {
|
||||
fullName += product.getName();
|
||||
if (reference != null) {
|
||||
fullName += " - " + reference;
|
||||
}
|
||||
}
|
||||
return fullName;
|
||||
]]>
|
||||
</string>
|
||||
|
||||
</entity>
|
||||
|
||||
</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="contract" package="com.axelor.apps.contract.db" />
|
||||
|
||||
<entity name="Contract" repository="abstract">
|
||||
|
||||
<integer name="targetTypeSelect" title="Type" selection="contract.target.type.select" default="1" required="true"/>
|
||||
<integer name="periodNumber" title="Number of finished periods" default="0"/>
|
||||
<integer name="statusSelect" title="Status" selection="contract.status.select" default="1" required="true"/>
|
||||
<integer name="renewalNumber" title="Number of renewal"/>
|
||||
<integer name="versionNumber" title="Contract version" default="-1"/>
|
||||
|
||||
<string name="name" title="Name" namecolumn="true" />
|
||||
<string name="note" multiline="true" large="true" title="Notes"/>
|
||||
<string name="contractId" title="Contract N°" readonly="true"/>
|
||||
|
||||
<boolean name="isInvoicingManagement" title="Manage invoices" />
|
||||
<boolean name="isConsumptionManagement" title="Consumption management" />
|
||||
<boolean name="isAdditionaBenefitManagement" title="Additional benefit management" />
|
||||
<boolean name="toClosed" title="To closed"/>
|
||||
<boolean name="terminatedManually" title="Terminated manually" default="false"/>
|
||||
|
||||
<date name="firstPeriodEndDate" title="First period end date"/>
|
||||
<date name="startDate" title="Start date"/>
|
||||
<date name="endDate" title="End date"/>
|
||||
<date name="terminatedDate" title="Terminated date"/>
|
||||
<date name="engagementStartDate" title="Engagement start date" />
|
||||
<date name="terminationDemandDate" title="Termination demand date" />
|
||||
<date name="lastRenewalDate" title="Last renewal date"/>
|
||||
<date name="invoicePeriodStartDate" title="Start of next invoicing period" />
|
||||
<date name="invoicePeriodEndDate" title="End of next invoicing period" />
|
||||
<date name="invoicingDate" title="Invoicing date" />
|
||||
|
||||
<many-to-one name="company" title="Company" ref="com.axelor.apps.base.db.Company" required="true"/>
|
||||
<many-to-one name="partner" title="Partner" ref="com.axelor.apps.base.db.Partner" />
|
||||
<many-to-one name="terminatedByUser" ref="com.axelor.auth.db.User" title="Terminated By"/>
|
||||
<many-to-one name="currentInvoicePeriod" ref="com.axelor.apps.contract.db.InvoicePeriod" title="Current invoice period"/>
|
||||
<many-to-one name="currency" ref="com.axelor.apps.base.db.Currency" title="Currency" />
|
||||
|
||||
<one-to-one name="currentContractVersion" ref="com.axelor.apps.contract.db.ContractVersion" required="true" title="Current version"/>
|
||||
<one-to-one name="nextVersion" ref="com.axelor.apps.contract.db.ContractVersion" title="Next version"/>
|
||||
|
||||
<one-to-many name="additionalBenefitContractLineList" ref="com.axelor.apps.contract.db.ContractLine" title="Next Invoice Additional Benefit"/>
|
||||
<one-to-many name="historyInvoicePeriodList" ref="com.axelor.apps.contract.db.InvoicePeriod" title="Invoice period history"/>
|
||||
<one-to-many name="versionHistory" ref="com.axelor.apps.contract.db.ContractVersion" mappedBy="contractHistory" orderBy="-createdOn"/>
|
||||
<one-to-many name="consumptionLineList" ref="com.axelor.apps.contract.db.ConsumptionLine" title="Consumption for next invoice"/>
|
||||
|
||||
<many-to-many name="batchSet" ref="com.axelor.apps.base.db.Batch" title="Batches"/>
|
||||
|
||||
<extra-code><![CDATA[
|
||||
static final String CUSTOMER_CONTRACT_SEQUENCE = "customerContract";
|
||||
static final String SUPPLIER_CONTRACT_SEQUENCE = "supplierContract";
|
||||
|
||||
public static final int DRAFT_CONTRACT = 1;
|
||||
public static final int ACTIVE_CONTRACT = 2;
|
||||
public static final int CLOSED_CONTRACT = 3;
|
||||
|
||||
public static final int CUSTOMER_CONTRACT = 1;
|
||||
public static final int SUPPLIER_CONTRACT = 2;
|
||||
]]></extra-code>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,23 @@
|
||||
<?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="contract" package="com.axelor.apps.contract.db" />
|
||||
|
||||
<entity name="ContractBatch">
|
||||
<string name="code" title="Code" namecolumn="true" unique="true"/>
|
||||
<integer name="actionSelect" required="true" title="Action" selection="contract.batch.action.select"/>
|
||||
<many-to-one name="company" ref="com.axelor.apps.base.db.Company" title="Company" />
|
||||
<string name="description" title="Description" large="true" />
|
||||
<one-to-many name="batchList" ref="com.axelor.apps.base.db.Batch" mappedBy="contractBatch" title="Batchs" />
|
||||
|
||||
<extra-code><![CDATA[
|
||||
public static final int INVOICING = 1;
|
||||
public static final int TERMINATE = 2;
|
||||
public static final int CURRENT_VERSION_ACTIVATION = 3;
|
||||
public static final int NEXT_VERSION_ACTIVATION = 4;
|
||||
]]></extra-code>
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,50 @@
|
||||
<?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="contract" package="com.axelor.apps.contract.db" />
|
||||
|
||||
<entity name="ContractLine">
|
||||
|
||||
<integer name="sequence"/>
|
||||
|
||||
<string name="fullName" namecolumn="true">
|
||||
<![CDATA[
|
||||
String fullName = "";
|
||||
if(productName != null && productName.length() > 255) {
|
||||
fullName += productName.substring(1, 255);
|
||||
}
|
||||
else { fullName += productName; }
|
||||
return fullName;
|
||||
]]>
|
||||
</string>
|
||||
|
||||
<many-to-one name="product" ref="com.axelor.apps.base.db.Product" title="Product" required="true" />
|
||||
<decimal name="qty" title="Qty" default="1"/>
|
||||
|
||||
<string name="productName" title="Displayed Product name" required="true"/>
|
||||
<decimal name="price" title="Unit price"/>
|
||||
|
||||
<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="fiscalPosition" ref="com.axelor.apps.account.db.FiscalPosition" title="Fiscal position"/>
|
||||
|
||||
<string name="description" title="Description" large="true"/>
|
||||
<many-to-one name="unit" ref="com.axelor.apps.base.db.Unit" title="Unit"/>
|
||||
|
||||
<boolean name="isConsumptionLine" title="Invoice from consumption" default="false"/>
|
||||
|
||||
<boolean name="isInvoiced" title="Is invoiced" />
|
||||
|
||||
<many-to-one name="contractVersion" ref="com.axelor.apps.contract.db.ContractVersion"/>
|
||||
|
||||
<one-to-many name="analyticMoveLineList" ref="com.axelor.apps.account.db.AnalyticMoveLine" title="Analytic move lines" mappedBy="contractLine"/>
|
||||
<many-to-one name="analyticDistributionTemplate" title="Analytic distribution template" ref="com.axelor.apps.account.db.AnalyticDistributionTemplate"/>
|
||||
|
||||
<finder-method name="findOneBy"
|
||||
using="contractVersion, product, productName,
|
||||
isConsumptionLine"/>
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,50 @@
|
||||
<?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="contract" package="com.axelor.apps.contract.db" />
|
||||
|
||||
<entity name="ContractTemplate">
|
||||
|
||||
<integer name="periodNumber" title="Number of finished periods" default="0"/>
|
||||
<integer name="targetTypeSelect" title="Type" selection="contract.target.type.select" default="1" required="true"/>
|
||||
<integer name="invoicingMomentSelect" selection="contract.version.invoicing.moment.select" title="Invoicing moment" default="1"/>
|
||||
|
||||
<string name="description" title="Description" multiline="true" large="true" />
|
||||
<string name="note" multiline="true" large="true" title="Notes"/>
|
||||
<string name="name" title="Name" required="true" namecolumn="true" />
|
||||
|
||||
<boolean name="isInvoicingManagement" title="Manage invoices" />
|
||||
<boolean name="isConsumptionManagement" title="Consumption management" />
|
||||
<boolean name="isAdditionaBenefitManagement" title="Additional benefit management" />
|
||||
<boolean name="automaticInvoicing" title="Automatic invoicing" default="false"/>
|
||||
<boolean name="isPeriodicInvoicing" title="Periodic Invoicing" default="false"/>
|
||||
<boolean name="isProratedInvoice" title="Prorated Invoice" default="false"/>
|
||||
<boolean name="isProratedFirstInvoice" title="Prorated Starting periods" default="false"/>
|
||||
<boolean name="isProratedLastInvoice" title="Prorated finished periods" default="false"/>
|
||||
<boolean name="isTimeProratedInvoice" title="Protrate temporally" />
|
||||
<boolean name="isVersionProratedInvoice" title="Prorate from versions" />
|
||||
<boolean name="isTacitRenewal" title="Tacit renewal"/>
|
||||
<boolean name="isWithEngagement" title="With engagement"/>
|
||||
<boolean name="engagementStartFromVersion" title="Engagement start from version"/>
|
||||
<boolean name="isWithPriorNotice" title="With prior notice"/>
|
||||
<boolean name="isConsumptionBeforeEndDate" title="Only invoice consumption before Invoice period end Date" />
|
||||
<boolean name="isAutoEnableVersionOnRenew" title="Auto enable version on renew"/>
|
||||
|
||||
<date name="firstPeriodEndDate" title="First period end date"/>
|
||||
|
||||
<many-to-one name="company" title="Company" ref="com.axelor.apps.base.db.Company" required="true"/>
|
||||
<many-to-one name="paymentMode" ref="com.axelor.apps.account.db.PaymentMode" title="Payment mode"/>
|
||||
<many-to-one name="paymentCondition" ref="com.axelor.apps.account.db.PaymentCondition" title="Payment condition"/>
|
||||
<many-to-one name="invoicingDuration" ref="com.axelor.apps.base.db.Duration" title="Invoicing Frequency"/>
|
||||
<many-to-one name="renewalDuration" title="Renewal duration" ref="com.axelor.apps.base.db.Duration" />
|
||||
<many-to-one name="engagementDuration" title="Engagement duration" ref="com.axelor.apps.base.db.Duration" />
|
||||
<many-to-one name="priorNoticeDuration" title="Prior notice duration" ref="com.axelor.apps.base.db.Duration" />
|
||||
|
||||
<one-to-many name="additionalBenefitContractLineList" ref="com.axelor.apps.contract.db.ContractLine" title="Next Invoice Additional Benefit"/>
|
||||
<one-to-many name="contractLineList" ref="com.axelor.apps.contract.db.ContractLine" title="Invoicing content"/>
|
||||
<many-to-one name="currency" ref="com.axelor.apps.base.db.Currency" title="Currency" />
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,79 @@
|
||||
<?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="contract" package="com.axelor.apps.contract.db" />
|
||||
|
||||
<entity name="ContractVersion" repository="abstract">
|
||||
|
||||
<integer name="statusSelect" title="Status" selection="contract.version.status.select" default="1" required="true" copy="false"/>
|
||||
<integer name="invoicingMomentSelect" selection="contract.version.invoicing.moment.select" title="Invoicing moment" default="1"/>
|
||||
<integer name="numberOfDays" title="Number of days"/>
|
||||
|
||||
<string name="description" title="Description" multiline="true" large="true" />
|
||||
|
||||
<boolean name="doNotRenew" title="Do not renew" default="false" />
|
||||
<boolean name="automaticInvoicing" title="Automatic invoicing" default="false"/>
|
||||
<boolean name="isPeriodicInvoicing" title="Periodic Invoicing" default="false"/>
|
||||
<boolean name="isProratedInvoice" title="Prorated Invoice" default="false"/>
|
||||
<boolean name="isProratedFirstInvoice" title="Prorated Starting periods" default="false"/>
|
||||
<boolean name="isProratedLastInvoice" title="Prorated finished periods" default="false"/>
|
||||
<boolean name="isTimeProratedInvoice" title="Prorated temporally" />
|
||||
<boolean name="isVersionProratedInvoice" title="Prorate from versions" />
|
||||
<boolean name="isTacitRenewal" title="Tacit renewal"/>
|
||||
<boolean name="isAutoEnableVersionOnRenew" title="Auto enable version on renew"/>
|
||||
<boolean name="isWithEngagement" title="With engagement"/>
|
||||
<boolean name="engagementStartFromVersion" title="Engagement start from version"/>
|
||||
<boolean name="isWithPriorNotice" title="With prior notice"/>
|
||||
<boolean name="isConsumptionBeforeEndDate" title="Only invoice consumption before Invoice period end Date" />
|
||||
<boolean name="isConsumptionManagement" title="Consumption management" default="false"/>
|
||||
|
||||
<date name="supposedActivationDate" title="Supposed activation date" copy="false"/>
|
||||
<date name="activationDate" title="Activation date" copy="false"/>
|
||||
<date name="supposedEndDate" title="Supposed end date" copy="false"/>
|
||||
<date name="endDate" title="End date" copy="false"/>
|
||||
|
||||
<many-to-one name="activatedByUser" ref="com.axelor.auth.db.User" title="Activated By" copy="false"/>
|
||||
<many-to-one name="paymentMode" ref="com.axelor.apps.account.db.PaymentMode" title="Payment mode"/>
|
||||
<many-to-one name="paymentCondition" ref="com.axelor.apps.account.db.PaymentCondition" title="Payment condition"/>
|
||||
<many-to-one name="invoicingDuration" ref="com.axelor.apps.base.db.Duration" title="Invoicing Frequency"/>
|
||||
<many-to-one name="contractHistory" ref="com.axelor.apps.contract.db.Contract" title="Contract" copy="false"/>
|
||||
<many-to-one name="renewalDuration" title="Renewal duration" ref="com.axelor.apps.base.db.Duration" />
|
||||
<many-to-one name="engagementDuration" title="Engagement duration" ref="com.axelor.apps.base.db.Duration" />
|
||||
<many-to-one name="priorNoticeDuration" title="Prior notice duration" ref="com.axelor.apps.base.db.Duration" />
|
||||
<many-to-one name="metaFile" ref="com.axelor.meta.db.MetaFile"/>
|
||||
|
||||
<one-to-one name="contract" ref="com.axelor.apps.contract.db.Contract" title="Contract" mappedBy="currentContractVersion" copy="false"/>
|
||||
<one-to-one name="nextContract" ref="com.axelor.apps.contract.db.Contract" title="Contract" mappedBy="nextVersion" copy="false"/>
|
||||
|
||||
<one-to-many name="contractLineList" ref="com.axelor.apps.contract.db.ContractLine" title="Invoicing content" mappedBy="contractVersion"/>
|
||||
|
||||
<string name="fullName" namecolumn="true">
|
||||
<![CDATA[
|
||||
String fullName = "";
|
||||
if(contract != null && contract.getName() != null) {
|
||||
fullName += contract.getName();
|
||||
if (contract.getVersionNumber() != null && contract.getVersionNumber() != 0){
|
||||
fullName += " " + contract.getVersionNumber();
|
||||
}
|
||||
}
|
||||
|
||||
return fullName;
|
||||
]]>
|
||||
</string>
|
||||
|
||||
<extra-code><![CDATA[
|
||||
public static final int DRAFT_VERSION = 1;
|
||||
public static final int WAITING_VERSION = 2;
|
||||
public static final int ONGOING_VERSION = 3;
|
||||
public static final int TERMINATED_VERSION = 4;
|
||||
|
||||
public static final int END_INVOICING_MOMENT = 1;
|
||||
public static final int BEGIN_INVOICING_MOMENT = 2;
|
||||
public static final int END_INVOICING_MOMENT_PLUS = 3;
|
||||
public static final int BEGIN_INVOICING_MOMENT_PLUS = 4;
|
||||
]]></extra-code>
|
||||
|
||||
</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="purchase" package="com.axelor.apps.purchase.db"/>
|
||||
|
||||
<entity name="ImportationFolder" lang="java">
|
||||
<many-to-one name="contract" title="Contract" ref="com.axelor.apps.contract.db.Contract" />
|
||||
</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="account" package="com.axelor.apps.account.db"/>
|
||||
|
||||
<entity name="Invoice" lang="java" cacheable="true" >
|
||||
|
||||
<many-to-one name="contract" title="Contract" ref="com.axelor.apps.contract.db.Contract" />
|
||||
|
||||
<extra-code><![CDATA[
|
||||
// OPERATION TYPE SUB SELECT
|
||||
public static final int OPERATION_SUB_TYPE_CONTRACT_INVOICE = 4;
|
||||
public static final int OPERATION_SUB_TYPE_CONTRACT_CLOSING_INVOICE = 5;
|
||||
public static final int OPERATION_SUB_TYPE_CONTRACT_PERIODIC_INVOICE = 7;
|
||||
]]></extra-code>
|
||||
|
||||
</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="account" package="com.axelor.apps.account.db"/>
|
||||
|
||||
<entity name="InvoiceLine" lang="java" cacheable="true" >
|
||||
|
||||
<many-to-one name="contractLine" title="Contract line" ref="com.axelor.apps.contract.db.ContractLine" />
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,33 @@
|
||||
<?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="contract" package="com.axelor.apps.contract.db" />
|
||||
|
||||
<entity name="InvoicePeriod" repository="none">
|
||||
|
||||
<string name="fullName" namecolumn="true">
|
||||
<![CDATA[
|
||||
String fullname = "";
|
||||
if( startDate != null && endDate != null) {
|
||||
fullname = startDate.toString() + " - " + endDate.toString();
|
||||
}
|
||||
return fullname;
|
||||
]]>
|
||||
</string>
|
||||
|
||||
<integer name="statusSelect" title="Statut" selection="contract.invoice.period.statut.select" default="1" readonly="true"/>
|
||||
<boolean name="isLastPeriod" title="Last Invoicing period" default="false" readonly="true"/>
|
||||
<date name="startDate" title="Start date" readonly="true"/>
|
||||
<date name="endDate" title="End date" readonly="true"/>
|
||||
|
||||
<one-to-many name="consumptionLineList" ref="com.axelor.apps.contract.db.ConsumptionLine" title="Consumptions"/>
|
||||
<one-to-many name="additionalBenefitList" ref="com.axelor.apps.contract.db.ContractLine" title="Additional benefit"/>
|
||||
|
||||
<many-to-one name="invoice" ref="com.axelor.apps.account.db.Invoice" title="Linked invoice" readonly="true"/>
|
||||
|
||||
<many-to-one name="contract" ref="com.axelor.apps.contract.db.Contract" title="Contract"/>
|
||||
|
||||
</entity>
|
||||
|
||||
</domain-models>
|
||||
@ -0,0 +1,201 @@
|
||||
"key","message","comment","context"
|
||||
"Action",,,
|
||||
"Action %s has no Batch implementation.",,,
|
||||
"Actions",,,
|
||||
"Activate",,,
|
||||
"Activated By",,,
|
||||
"Activation date",,,
|
||||
"Active",,,
|
||||
"Additional Benefit Management",,,
|
||||
"Additional benefit",,,
|
||||
"Additional benefit lines",,,
|
||||
"Additional benefit management",,,
|
||||
"Advanced",,,
|
||||
"Amendment management",,,
|
||||
"Analytic distribution template",,,
|
||||
"Analytic move lines",,,
|
||||
"Analytics",,,
|
||||
"App contract",,,
|
||||
"Attention the contract will have as starting date the provisional activation date ${currentContractVersion.supposedActivationDate}, Are you sure?",,,
|
||||
"Auto enable version on renew",,,
|
||||
"Automatic invoicing",,,
|
||||
"Back",,,
|
||||
"Batches",,,
|
||||
"Batchs",,,
|
||||
"Cancel",,,
|
||||
"Close contract",,,
|
||||
"Closed",,,
|
||||
"Code",,,
|
||||
"Company",,,
|
||||
"Config.",,,
|
||||
"Configurable contract",,,
|
||||
"Configuration",,,
|
||||
"Consumption Line",,,
|
||||
"Consumption Lines",,,
|
||||
"Consumption for next invoice",,,
|
||||
"Consumption management",,,
|
||||
"Consumptions",,,
|
||||
"Content",,,
|
||||
"Contract",,,
|
||||
"Contract Dates",,,
|
||||
"Contract Line",,,
|
||||
"Contract Lines",,,
|
||||
"Contract N°",,,
|
||||
"Contract batch",,,
|
||||
"Contract batches",,,
|
||||
"Contract can't be empty for compute contract line price.",,,
|
||||
"Contract closing invoice",,,
|
||||
"Contract invoice",,,
|
||||
"Contract line",,,
|
||||
"Contract template",,,
|
||||
"Contract template to use",,,
|
||||
"Contract templates",,,
|
||||
"Contract version",,,
|
||||
"Contracts",,,
|
||||
"Copy",,,
|
||||
"Create PO",,,
|
||||
"Created by",,,
|
||||
"Created on",,,
|
||||
"Currency",,,
|
||||
"Current invoice period",,,
|
||||
"Current version",,,
|
||||
"Current version activation",,,
|
||||
"Customer",,,
|
||||
"Customer contracts",,,
|
||||
"Date",,,
|
||||
"Delete",,,
|
||||
"Delete next version",,,
|
||||
"Description",,,
|
||||
"Displayed Product name",,,
|
||||
"Do not renew",,,
|
||||
"Do you really wish to fill your contract based on this template ?",,,
|
||||
"Draft",,,
|
||||
"Duration",,,
|
||||
"Durations",,,
|
||||
"End date",,,
|
||||
"End of next invoicing period",,,
|
||||
"End of period",,,
|
||||
"End of period plus",,,
|
||||
"Engagement",,,
|
||||
"Engagement duration",,,
|
||||
"Engagement duration is not fulfilled.",,,
|
||||
"Engagement start date",,,
|
||||
"Engagement start from version",,,
|
||||
"Error",,,
|
||||
"First period end date",,,
|
||||
"First period invoicing end date",,,
|
||||
"Fiscal position",,,
|
||||
"Forecast (contract)",,,
|
||||
"Full name",,,
|
||||
"General",,,
|
||||
"Information",,,
|
||||
"Informations",,,
|
||||
"Invoice",,,
|
||||
"Invoice from consumption",,,
|
||||
"Invoice line",,,
|
||||
"Invoice period",,,
|
||||
"Invoice period history",,,
|
||||
"Invoice periods",,,
|
||||
"Invoiced",,,
|
||||
"Invoices",,,
|
||||
"Invoicing",,,
|
||||
"Invoicing Frequency",,,
|
||||
"Invoicing content",,,
|
||||
"Invoicing date",,,
|
||||
"Invoicing management",,,
|
||||
"Invoicing moment",,,
|
||||
"Is invoiced",,,
|
||||
"Last Invoicing period",,,
|
||||
"Last renewal date",,,
|
||||
"Linked invoice",,,
|
||||
"Manage invoices",,,
|
||||
"Meta file",,,
|
||||
"Name",,,
|
||||
"New",,,
|
||||
"New version",,,
|
||||
"Next Invoice Additional Benefit",,,
|
||||
"Next version",,,
|
||||
"Next version activation",,,
|
||||
"No contract is associated to version.",,,
|
||||
"Not invoiced",,,
|
||||
"Notes",,,
|
||||
"Nouvelle version",,,
|
||||
"Number of days",,,
|
||||
"Number of finished periods",,,
|
||||
"Number of renewal",,,
|
||||
"Ongoing",,,
|
||||
"Only invoice consumption before Invoice period end Date",,,
|
||||
"Partner",,,
|
||||
"Payment condition",,,
|
||||
"Payment mode",,,
|
||||
"Periodic Invoicing",,,
|
||||
"Periodic contract",,,
|
||||
"Please enter a engagement date.",,,
|
||||
"Please enter a terminated date for this version.",,,
|
||||
"Please fill the first period end date and the invoice frequency.",,,
|
||||
"Print",,,
|
||||
"Prior notice",,,
|
||||
"Prior notice duration",,,
|
||||
"Prior notice duration is not respected.",,,
|
||||
"Product",,,
|
||||
"Prorate from versions",,,
|
||||
"Prorated Invoice",,,
|
||||
"Prorated Starting periods",,,
|
||||
"Prorated finished periods",,,
|
||||
"Prorated temporally",,,
|
||||
"Protrate temporally",,,
|
||||
"Purchase orders",,,
|
||||
"Put on hold",,,
|
||||
"Qty",,,
|
||||
"Quantity",,,
|
||||
"Reference",,,
|
||||
"Renew",,,
|
||||
"Renewal",,,
|
||||
"Renewal duration",,,
|
||||
"Renewal management",,,
|
||||
"Run batch",,,
|
||||
"Search",,,
|
||||
"Sequence",,,
|
||||
"Show contract",,,
|
||||
"Show next version",,,
|
||||
"Start date",,,
|
||||
"Start of next invoicing period",,,
|
||||
"Start of period",,,
|
||||
"Start of period plus",,,
|
||||
"Status",,,
|
||||
"Statut",,,
|
||||
"Supplier",,,
|
||||
"Supplier contracts",,,
|
||||
"Supposed activation date",,,
|
||||
"Supposed end date",,,
|
||||
"Tacit renewal",,,
|
||||
"Tax",,,
|
||||
"Terminate",,,
|
||||
"Terminated",,,
|
||||
"Terminated By",,,
|
||||
"Terminated contracts",,,
|
||||
"Terminated date",,,
|
||||
"Terminated manually",,,
|
||||
"Termination",,,
|
||||
"Termination demand date",,,
|
||||
"The company %s doesn't have any configured sequence for contracts",,,
|
||||
"The product can't be empty.",,,
|
||||
"There is no contract associated with this version.",,,
|
||||
"To closed",,,
|
||||
"Total A.T.I.",,,
|
||||
"Total W.T.",,,
|
||||
"Type",,,
|
||||
"Unchangable contract",,,
|
||||
"Unit",,,
|
||||
"Unit price",,,
|
||||
"Use this template",,,
|
||||
"Version",,,
|
||||
"Version history",,,
|
||||
"Versions",,,
|
||||
"Waiting",,,
|
||||
"With engagement",,,
|
||||
"With prior notice",,,
|
||||
"You cannot remove a line which has been already invoiced.",,,
|
||||
"You cannot terminate a contract before version activation date.",,,
|
||||
"You need to save your contract for add lines.",,,
|
||||
"value:Contract",,,
|
||||
|
@ -0,0 +1,201 @@
|
||||
"key","message","comment","context"
|
||||
"Action","Aktion",,
|
||||
"Action %s has no Batch implementation.","Die Aktion %s hat keine Batch-Implementierung.",,
|
||||
"Actions","Aktionen",,
|
||||
"Activate",,,
|
||||
"Activated By","Aktiviert durch",,
|
||||
"Activation date","Aktivierungsdatum",,
|
||||
"Active","Aktiv",,
|
||||
"Additional Benefit Management","Management von Zusatzleistungen",,
|
||||
"Additional benefit","Zusätzlicher Nutzen",,
|
||||
"Additional benefit lines","Zusätzliche Leistungslinien",,
|
||||
"Additional benefit management","Management von Zusatzleistungen",,
|
||||
"Advanced","Fortgeschritten",,
|
||||
"Amendment management","Änderungsmanagement",,
|
||||
"Analytic distribution template",,,
|
||||
"Analytic move lines",,,
|
||||
"Analytics",,,
|
||||
"App contract","App-Vertrag",,
|
||||
"Attention the contract will have as starting date the provisional activation date ${currentContractVersion.supposedActivationDate}, Are you sure?","Achtung, der Vertrag wird als Startdatum das vorläufige Aktivierungsdatum haben ${currentContractVersion.supposedActivationDate}, Sind Sie sicher?",,
|
||||
"Auto enable version on renew","Automatische Aktivierung der Version bei der Erneuerung",,
|
||||
"Automatic invoicing","Automatische Rechnungsstellung",,
|
||||
"Back","Zurück",,
|
||||
"Batches","Chargen",,
|
||||
"Batchs","Chargen",,
|
||||
"Cancel","Abbrechen",,
|
||||
"Close contract",,,
|
||||
"Closed","Geschlossen",,
|
||||
"Code","Code",,
|
||||
"Company","Unternehmen",,
|
||||
"Config.","Konfig.",,
|
||||
"Configurable contract","Konfigurierbarer Vertrag",,
|
||||
"Configuration","Konfiguration",,
|
||||
"Consumption Line","Verbrauchsleitung",,
|
||||
"Consumption Lines","Verbrauchsleitungen",,
|
||||
"Consumption for next invoice","Verbrauch für die nächste Rechnung",,
|
||||
"Consumption management","Verbrauchsmanagement",,
|
||||
"Consumptions","Verbrauchswerte",,
|
||||
"Content","Inhalt",,
|
||||
"Contract","Vertrag",,
|
||||
"Contract Dates","Vertragsdaten",,
|
||||
"Contract Line","Vertragszeile",,
|
||||
"Contract Lines","Vertragszeilen",,
|
||||
"Contract N°","Vertragsnummer",,
|
||||
"Contract batch","Auftragscharge",,
|
||||
"Contract batches","Kontraktchargen",,
|
||||
"Contract can't be empty for compute contract line price.","Der Vertrag darf für die Berechnung des Vertragszeilenpreises nicht leer sein.",,
|
||||
"Contract closing invoice","Vertragsabschlussrechnung",,
|
||||
"Contract invoice","Vertragsrechnung",,
|
||||
"Contract line","Vertragslinie",,
|
||||
"Contract template","Vertragsvorlage",,
|
||||
"Contract template to use","Vertragsvorlage zur Verwendung",,
|
||||
"Contract templates","Vertragsvorlagen",,
|
||||
"Contract version","Vertragsversion",,
|
||||
"Contracts","Verträge",,
|
||||
"Copy","Kopieren",,
|
||||
"Create PO","Bestellung anlegen",,
|
||||
"Created by","Erstellt von",,
|
||||
"Created on","Erstellt am",,
|
||||
"Currency","Währung",,
|
||||
"Current invoice period","Aktueller Rechnungszeitraum",,
|
||||
"Current version","Aktuelle Version",,
|
||||
"Current version activation","Aktivierung der aktuellen Version",,
|
||||
"Customer","Kunde",,
|
||||
"Customer contracts","Kundenverträge",,
|
||||
"Date","Datum",,
|
||||
"Delete","Löschen",,
|
||||
"Delete next version","Nächste Version löschen",,
|
||||
"Description","Beschreibung",,
|
||||
"Displayed Product name","Angezeigter Produktname",,
|
||||
"Do not renew","Nicht verlängern",,
|
||||
"Do you really wish to fill your contract based on this template ?","Möchten Sie wirklich Ihren Vertrag auf der Grundlage dieser Vorlage erfüllen?",,
|
||||
"Draft","Entwurf",,
|
||||
"Duration","Dauer",,
|
||||
"Durations","Dauer",,
|
||||
"End date","Enddatum",,
|
||||
"End of next invoicing period","Ende des nächsten Abrechnungszeitraums",,
|
||||
"End of period","Ende des Zeitraums",,
|
||||
"End of period plus",,,
|
||||
"Engagement","Engagement",,
|
||||
"Engagement duration","Auftragsdauer",,
|
||||
"Engagement duration is not fulfilled.","Die Auftragsdauer ist nicht erfüllt.",,
|
||||
"Engagement start date","Startdatum des Engagements",,
|
||||
"Engagement start from version","Auftragsstart ab Version",,
|
||||
"Error","Fehler",,
|
||||
"First period end date","Erstes Periodenende Datum",,
|
||||
"First period invoicing end date","Enddatum der ersten Periode der Rechnungsstellung",,
|
||||
"Fiscal position","Steuerliche Situation",,
|
||||
"Forecast (contract)",,,
|
||||
"Full name","Vollständiger Name",,
|
||||
"General","Allgemeines",,
|
||||
"Information","Informationen",,
|
||||
"Informations","Informationen",,
|
||||
"Invoice","Rechnung",,
|
||||
"Invoice from consumption","Rechnung aus dem Verbrauch",,
|
||||
"Invoice line","Rechnungszeile",,
|
||||
"Invoice period","Rechnungsperiode",,
|
||||
"Invoice period history","Historie der Rechnungsperiode",,
|
||||
"Invoice periods","Rechnungsperioden",,
|
||||
"Invoiced","Rechnungsstellung",,
|
||||
"Invoices","Rechnungen",,
|
||||
"Invoicing","Rechnungsstellung",,
|
||||
"Invoicing Frequency","Fakturierungshäufigkeit",,
|
||||
"Invoicing content","Rechnungsinhalt",,
|
||||
"Invoicing date","Rechnungsdatum",,
|
||||
"Invoicing management","Rechnungsmanagement",,
|
||||
"Invoicing moment","Zeitpunkt der Rechnungsstellung",,
|
||||
"Is invoiced","Wird in Rechnung gestellt",,
|
||||
"Last Invoicing period","Letzter Abrechnungszeitraum",,
|
||||
"Last renewal date","Letztes Verlängerungsdatum",,
|
||||
"Linked invoice","Verknüpfte Rechnung",,
|
||||
"Manage invoices","Rechnungen verwalten",,
|
||||
"Meta file","Metadatei",,
|
||||
"Name","Name",,
|
||||
"New","Neu",,
|
||||
"New version","Neue Version",,
|
||||
"Next Invoice Additional Benefit","Nächste Rechnung Zusatznutzen",,
|
||||
"Next version","Nächste Version",,
|
||||
"Next version activation","Aktivierung der nächsten Version",,
|
||||
"No contract is associated to version.","Der Version ist kein Vertrag zugeordnet.",,
|
||||
"Not invoiced","Nicht fakturiert",,
|
||||
"Notes","Notizen",,
|
||||
"Nouvelle version","Nouvelle-Version",,
|
||||
"Number of days",,,
|
||||
"Number of finished periods","Anzahl der abgeschlossenen Perioden",,
|
||||
"Number of renewal","Anzahl der Verlängerungen",,
|
||||
"Ongoing","Fortlaufend",,
|
||||
"Only invoice consumption before Invoice period end Date","Nur Rechnungsverbrauch vor Ende des Rechnungszeitraums Datum",,
|
||||
"Partner","Partner",,
|
||||
"Payment condition","Zahlungsbedingungen",,
|
||||
"Payment mode","Zahlungsmodus",,
|
||||
"Periodic Invoicing","Periodische Fakturierung",,
|
||||
"Periodic contract","Periodischer Vertrag",,
|
||||
"Please enter a engagement date.","Bitte geben Sie ein Bindungsdatum ein.",,
|
||||
"Please enter a terminated date for this version.","Bitte geben Sie ein beendetes Datum für diese Version ein.",,
|
||||
"Please fill the first period end date and the invoice frequency.","Bitte geben Sie das erste Enddatum der Periode und den Rechnungsrhythmus an.",,
|
||||
"Print","Drucken",,
|
||||
"Prior notice","Vorankündigung",,
|
||||
"Prior notice duration","Dauer der Vorankündigung",,
|
||||
"Prior notice duration is not respected.","Die Dauer der Vorankündigung wird nicht eingehalten.",,
|
||||
"Product","Produkt",,
|
||||
"Prorate from versions","Abgrenzung aus Versionen",,
|
||||
"Prorated Invoice","Anteilige Rechnung",,
|
||||
"Prorated Starting periods","Anteilige Anlaufperioden",,
|
||||
"Prorated finished periods","Anteilige abgeschlossene Perioden",,
|
||||
"Prorated temporally","Zeitlich abgegrenzt",,
|
||||
"Protrate temporally","Protrata temporär",,
|
||||
"Purchase orders","Bestellungen",,
|
||||
"Put on hold",,,
|
||||
"Qty","Anzahl",,
|
||||
"Quantity","Menge",,
|
||||
"Reference","Referenz",,
|
||||
"Renew","Erneuern",,
|
||||
"Renewal","Erneuerung",,
|
||||
"Renewal duration","Verlängerungsdauer",,
|
||||
"Renewal management","Erneuerungsmanagement",,
|
||||
"Run batch","Charge ausführen",,
|
||||
"Search","Suche",,
|
||||
"Sequence","Sequenz",,
|
||||
"Show contract","Vertrag anzeigen",,
|
||||
"Show next version","Nächste Version anzeigen",,
|
||||
"Start date","Startdatum",,
|
||||
"Start of next invoicing period","Beginn des nächsten Abrechnungszeitraums",,
|
||||
"Start of period","Beginn der Periode",,
|
||||
"Start of period plus",,,
|
||||
"Status","Status",,
|
||||
"Statut","Satzung",,
|
||||
"Supplier","Lieferant",,
|
||||
"Supplier contracts","Lieferantenverträge",,
|
||||
"Supposed activation date","Voraussichtliches Aktivierungsdatum",,
|
||||
"Supposed end date","Angenommenes Enddatum",,
|
||||
"Tacit renewal","Stillschweigende Erneuerung",,
|
||||
"Tax","Steuer",,
|
||||
"Terminate","Beenden",,
|
||||
"Terminated","Abgeschlossen",,
|
||||
"Terminated By","Beendet durch",,
|
||||
"Terminated contracts","Beendete Verträge",,
|
||||
"Terminated date","Beendetes Datum",,
|
||||
"Terminated manually","Manuell beendet",,
|
||||
"Termination","Kündigung",,
|
||||
"Termination demand date","Datum der Kündigung der Nachfrage",,
|
||||
"The company %s doesn't have any configured sequence for contracts","Die Firma %s hat keine konfigurierte Reihenfolge für Verträge.",,
|
||||
"The product can't be empty.","Das Produkt darf nicht leer sein.",,
|
||||
"There is no contract associated with this version.","Mit dieser Version ist kein Vertrag verbunden.",,
|
||||
"To closed","Zu geschlossen",,
|
||||
"Total A.T.I.","Total A.T.I.",,
|
||||
"Total W.T.","Gesamt W.T.",,
|
||||
"Type","Typ",,
|
||||
"Unchangable contract","Unveränderlicher Vertrag",,
|
||||
"Unit","Einheit",,
|
||||
"Unit price","Stückpreis",,
|
||||
"Use this template","Diese Vorlage verwenden",,
|
||||
"Version","Version",,
|
||||
"Version history","Versionshistorie",,
|
||||
"Versions","Versionen",,
|
||||
"Waiting","Warten",,
|
||||
"With engagement","Mit Engagement",,
|
||||
"With prior notice","Mit Vorankündigung",,
|
||||
"You cannot remove a line which has been already invoiced.","Sie können eine bereits fakturierte Zeile nicht entfernen.",,
|
||||
"You cannot terminate a contract before version activation date.","Sie können einen Vertrag nicht vor dem Aktivierungsdatum der Version kündigen.",,
|
||||
"You need to save your contract for add lines.","Sie müssen Ihren Vertrag für zusätzliche Zeilen speichern.",,
|
||||
"value:Contract","Wert:Vertrag",,
|
||||
|
@ -0,0 +1,201 @@
|
||||
"key","message","comment","context"
|
||||
"Action",,,
|
||||
"Action %s has no Batch implementation.",,,
|
||||
"Actions",,,
|
||||
"Activate",,,
|
||||
"Activated By",,,
|
||||
"Activation date",,,
|
||||
"Active",,,
|
||||
"Additional Benefit Management",,,
|
||||
"Additional benefit",,,
|
||||
"Additional benefit lines",,,
|
||||
"Additional benefit management",,,
|
||||
"Advanced",,,
|
||||
"Amendment management",,,
|
||||
"Analytic distribution template",,,
|
||||
"Analytic move lines",,,
|
||||
"Analytics",,,
|
||||
"App contract",,,
|
||||
"Attention the contract will have as starting date the provisional activation date ${currentContractVersion.supposedActivationDate}, Are you sure?",,,
|
||||
"Auto enable version on renew",,,
|
||||
"Automatic invoicing",,,
|
||||
"Back",,,
|
||||
"Batches",,,
|
||||
"Batchs",,,
|
||||
"Cancel",,,
|
||||
"Close contract",,,
|
||||
"Closed",,,
|
||||
"Code",,,
|
||||
"Company",,,
|
||||
"Config.",,,
|
||||
"Configurable contract",,,
|
||||
"Configuration",,,
|
||||
"Consumption Line",,,
|
||||
"Consumption Lines",,,
|
||||
"Consumption for next invoice",,,
|
||||
"Consumption management",,,
|
||||
"Consumptions",,,
|
||||
"Content",,,
|
||||
"Contract",,,
|
||||
"Contract Dates",,,
|
||||
"Contract Line",,,
|
||||
"Contract Lines",,,
|
||||
"Contract N°",,,
|
||||
"Contract batch",,,
|
||||
"Contract batches",,,
|
||||
"Contract can't be empty for compute contract line price.",,,
|
||||
"Contract closing invoice",,,
|
||||
"Contract invoice",,,
|
||||
"Contract line",,,
|
||||
"Contract template",,,
|
||||
"Contract template to use",,,
|
||||
"Contract templates",,,
|
||||
"Contract version",,,
|
||||
"Contracts",,,
|
||||
"Copy",,,
|
||||
"Create PO",,,
|
||||
"Created by",,,
|
||||
"Created on",,,
|
||||
"Currency",,,
|
||||
"Current invoice period",,,
|
||||
"Current version",,,
|
||||
"Current version activation",,,
|
||||
"Customer",,,
|
||||
"Customer contracts",,,
|
||||
"Date",,,
|
||||
"Delete",,,
|
||||
"Delete next version",,,
|
||||
"Description",,,
|
||||
"Displayed Product name",,,
|
||||
"Do not renew",,,
|
||||
"Do you really wish to fill your contract based on this template ?",,,
|
||||
"Draft",,,
|
||||
"Duration",,,
|
||||
"Durations",,,
|
||||
"End date",,,
|
||||
"End of next invoicing period",,,
|
||||
"End of period",,,
|
||||
"End of period plus",,,
|
||||
"Engagement",,,
|
||||
"Engagement duration",,,
|
||||
"Engagement duration is not fulfilled.",,,
|
||||
"Engagement start date",,,
|
||||
"Engagement start from version",,,
|
||||
"Error",,,
|
||||
"First period end date",,,
|
||||
"First period invoicing end date",,,
|
||||
"Fiscal position",,,
|
||||
"Forecast (contract)",,,
|
||||
"Full name",,,
|
||||
"General",,,
|
||||
"Information",,,
|
||||
"Informations",,,
|
||||
"Invoice",,,
|
||||
"Invoice from consumption",,,
|
||||
"Invoice line",,,
|
||||
"Invoice period",,,
|
||||
"Invoice period history",,,
|
||||
"Invoice periods",,,
|
||||
"Invoiced",,,
|
||||
"Invoices",,,
|
||||
"Invoicing",,,
|
||||
"Invoicing Frequency",,,
|
||||
"Invoicing content",,,
|
||||
"Invoicing date",,,
|
||||
"Invoicing management",,,
|
||||
"Invoicing moment",,,
|
||||
"Is invoiced",,,
|
||||
"Last Invoicing period",,,
|
||||
"Last renewal date",,,
|
||||
"Linked invoice",,,
|
||||
"Manage invoices",,,
|
||||
"Meta file",,,
|
||||
"Name",,,
|
||||
"New",,,
|
||||
"New version",,,
|
||||
"Next Invoice Additional Benefit",,,
|
||||
"Next version",,,
|
||||
"Next version activation",,,
|
||||
"No contract is associated to version.",,,
|
||||
"Not invoiced",,,
|
||||
"Notes",,,
|
||||
"Nouvelle version",,,
|
||||
"Number of days",,,
|
||||
"Number of finished periods",,,
|
||||
"Number of renewal",,,
|
||||
"Ongoing",,,
|
||||
"Only invoice consumption before Invoice period end Date",,,
|
||||
"Partner",,,
|
||||
"Payment condition",,,
|
||||
"Payment mode",,,
|
||||
"Periodic Invoicing",,,
|
||||
"Periodic contract",,,
|
||||
"Please enter a engagement date.",,,
|
||||
"Please enter a terminated date for this version.",,,
|
||||
"Please fill the first period end date and the invoice frequency.",,,
|
||||
"Print",,,
|
||||
"Prior notice",,,
|
||||
"Prior notice duration",,,
|
||||
"Prior notice duration is not respected.",,,
|
||||
"Product",,,
|
||||
"Prorate from versions",,,
|
||||
"Prorated Invoice",,,
|
||||
"Prorated Starting periods",,,
|
||||
"Prorated finished periods",,,
|
||||
"Prorated temporally",,,
|
||||
"Protrate temporally",,,
|
||||
"Purchase orders",,,
|
||||
"Put on hold",,,
|
||||
"Qty",,,
|
||||
"Quantity",,,
|
||||
"Reference",,,
|
||||
"Renew",,,
|
||||
"Renewal",,,
|
||||
"Renewal duration",,,
|
||||
"Renewal management",,,
|
||||
"Run batch",,,
|
||||
"Search",,,
|
||||
"Sequence",,,
|
||||
"Show contract",,,
|
||||
"Show next version",,,
|
||||
"Start date",,,
|
||||
"Start of next invoicing period",,,
|
||||
"Start of period",,,
|
||||
"Start of period plus",,,
|
||||
"Status",,,
|
||||
"Statut",,,
|
||||
"Supplier",,,
|
||||
"Supplier contracts",,,
|
||||
"Supposed activation date",,,
|
||||
"Supposed end date",,,
|
||||
"Tacit renewal",,,
|
||||
"Tax",,,
|
||||
"Terminate",,,
|
||||
"Terminated",,,
|
||||
"Terminated By",,,
|
||||
"Terminated contracts",,,
|
||||
"Terminated date",,,
|
||||
"Terminated manually",,,
|
||||
"Termination",,,
|
||||
"Termination demand date",,,
|
||||
"The company %s doesn't have any configured sequence for contracts",,,
|
||||
"The product can't be empty.",,,
|
||||
"There is no contract associated with this version.",,,
|
||||
"To closed",,,
|
||||
"Total A.T.I.",,,
|
||||
"Total W.T.",,,
|
||||
"Type",,,
|
||||
"Unchangable contract",,,
|
||||
"Unit",,,
|
||||
"Unit price",,,
|
||||
"Use this template",,,
|
||||
"Version",,,
|
||||
"Version history",,,
|
||||
"Versions",,,
|
||||
"Waiting",,,
|
||||
"With engagement",,,
|
||||
"With prior notice",,,
|
||||
"You cannot remove a line which has been already invoiced.",,,
|
||||
"You cannot terminate a contract before version activation date.",,,
|
||||
"You need to save your contract for add lines.",,,
|
||||
"value:Contract",,,
|
||||
|
@ -0,0 +1,201 @@
|
||||
"key","message","comment","context"
|
||||
"Action","Acción",,
|
||||
"Action %s has no Batch implementation.","Acción %s no tiene implementación de Batch.",,
|
||||
"Actions","Acciones",,
|
||||
"Activate",,,
|
||||
"Activated By","Activado por",,
|
||||
"Activation date","Fecha de activación",,
|
||||
"Active","Activo",,
|
||||
"Additional Benefit Management","Gestión de beneficios adicionales",,
|
||||
"Additional benefit","Beneficio adicional",,
|
||||
"Additional benefit lines","Líneas de beneficios adicionales",,
|
||||
"Additional benefit management","Gestión de beneficios adicionales",,
|
||||
"Advanced","Avanzado",,
|
||||
"Amendment management","Gestión de enmiendas",,
|
||||
"Analytic distribution template",,,
|
||||
"Analytic move lines",,,
|
||||
"Analytics",,,
|
||||
"App contract","Contrato de aplicación",,
|
||||
"Attention the contract will have as starting date the provisional activation date ${currentContractVersion.supposedActivationDate}, Are you sure?","Atención el contrato tendrá como fecha de inicio la fecha de activación provisional ${currentContractVersion.supposedActivationDate}, ¿Está seguro?",,
|
||||
"Auto enable version on renew","Versión de habilitación automática al renovar",,
|
||||
"Automatic invoicing","Facturación automática",,
|
||||
"Back","Espalda",,
|
||||
"Batches","Lotes",,
|
||||
"Batchs","Lotes",,
|
||||
"Cancel","Cancelar",,
|
||||
"Close contract",,,
|
||||
"Closed","Cerrado",,
|
||||
"Code","Código",,
|
||||
"Company","Empresa",,
|
||||
"Config.","Config.",,
|
||||
"Configurable contract","Contrato configurable",,
|
||||
"Configuration","Configuración",,
|
||||
"Consumption Line","Línea de Consumo",,
|
||||
"Consumption Lines","Líneas de Consumo",,
|
||||
"Consumption for next invoice","Consumo para la siguiente factura",,
|
||||
"Consumption management","Gestión de consumos",,
|
||||
"Consumptions","Consumos",,
|
||||
"Content","Contenido",,
|
||||
"Contract","Contrato",,
|
||||
"Contract Dates","Fechas del contrato",,
|
||||
"Contract Line","Línea de Contrato",,
|
||||
"Contract Lines","Líneas de contrato",,
|
||||
"Contract N°","Contrato N°",,
|
||||
"Contract batch","Lote de contrato",,
|
||||
"Contract batches","Lotes de contrato",,
|
||||
"Contract can't be empty for compute contract line price.","El contrato no puede estar vacío para calcular el precio de la línea del contrato.",,
|
||||
"Contract closing invoice","Factura de cierre del contrato",,
|
||||
"Contract invoice","Factura del contrato",,
|
||||
"Contract line","Línea de contrato",,
|
||||
"Contract template","Modelo de contrato",,
|
||||
"Contract template to use","Modelo de contrato a utilizar",,
|
||||
"Contract templates","Modelos de contrato",,
|
||||
"Contract version","Versión de contrato",,
|
||||
"Contracts","Contratos",,
|
||||
"Copy","Copiar",,
|
||||
"Create PO","Crear pedido",,
|
||||
"Created by","Creado por",,
|
||||
"Created on","Creado el",,
|
||||
"Currency","Moneda",,
|
||||
"Current invoice period","Período de facturación actual",,
|
||||
"Current version","Versión actual",,
|
||||
"Current version activation","Activación de la versión actual",,
|
||||
"Customer","Cliente",,
|
||||
"Customer contracts","Contratos de deudor",,
|
||||
"Date","Fecha",,
|
||||
"Delete","Borrar",,
|
||||
"Delete next version","Borrar la siguiente versión",,
|
||||
"Description","Descripción",,
|
||||
"Displayed Product name","Nombre del producto",,
|
||||
"Do not renew","No renovar",,
|
||||
"Do you really wish to fill your contract based on this template ?","¿Realmente desea llenar su contrato basado en esta plantilla?",,
|
||||
"Draft","Proyecto de",,
|
||||
"Duration","Duración",,
|
||||
"Durations","Duraciones",,
|
||||
"End date","Fecha de finalización",,
|
||||
"End of next invoicing period","Fin del próximo período de facturación",,
|
||||
"End of period","Fin del período",,
|
||||
"End of period plus",,,
|
||||
"Engagement","Compromiso",,
|
||||
"Engagement duration","Duración del compromiso",,
|
||||
"Engagement duration is not fulfilled.","No se cumple la duración del compromiso.",,
|
||||
"Engagement start date","Fecha de inicio del compromiso",,
|
||||
"Engagement start from version","El compromiso comienza a partir de la versión",,
|
||||
"Error","Error",,
|
||||
"First period end date","Fecha de fin del primer período",,
|
||||
"First period invoicing end date","Fecha final de facturación del primer período",,
|
||||
"Fiscal position","Situación fiscal",,
|
||||
"Forecast (contract)",,,
|
||||
"Full name","Nombre completo",,
|
||||
"General","General",,
|
||||
"Information","Información",,
|
||||
"Informations","Informaciones",,
|
||||
"Invoice","Factura",,
|
||||
"Invoice from consumption","Factura de consumo",,
|
||||
"Invoice line","Línea de la factura",,
|
||||
"Invoice period","Período de facturación",,
|
||||
"Invoice period history","Historial del período de facturación",,
|
||||
"Invoice periods","Períodos de facturación",,
|
||||
"Invoiced","Facturado",,
|
||||
"Invoices","Facturas",,
|
||||
"Invoicing","Facturación",,
|
||||
"Invoicing Frequency","Frecuencia de facturación",,
|
||||
"Invoicing content","Contenido de la factura",,
|
||||
"Invoicing date","Fecha de facturación",,
|
||||
"Invoicing management","Gestión de la facturación",,
|
||||
"Invoicing moment","Momento de facturación",,
|
||||
"Is invoiced","Se factura",,
|
||||
"Last Invoicing period","Último período de facturación",,
|
||||
"Last renewal date","Fecha de la última renovación",,
|
||||
"Linked invoice","Factura vinculada",,
|
||||
"Manage invoices","Gestionar facturas",,
|
||||
"Meta file","Meta fichero",,
|
||||
"Name","Nombre",,
|
||||
"New","Nuevo",,
|
||||
"New version","Nueva versión",,
|
||||
"Next Invoice Additional Benefit","Siguiente factura Beneficio adicional",,
|
||||
"Next version","Próxima versión",,
|
||||
"Next version activation","Activación de la siguiente versión",,
|
||||
"No contract is associated to version.","Ningún contrato está asociado a la versión.",,
|
||||
"Not invoiced","No facturado",,
|
||||
"Notes","Notas",,
|
||||
"Nouvelle version","Nueva versión",,
|
||||
"Number of days",,,
|
||||
"Number of finished periods","Número de períodos finalizados",,
|
||||
"Number of renewal","Número de renovación",,
|
||||
"Ongoing","En curso",,
|
||||
"Only invoice consumption before Invoice period end Date","Sólo consumo de facturas antes de la fecha de fin del período de facturación",,
|
||||
"Partner","Socio",,
|
||||
"Payment condition","Condición de pago",,
|
||||
"Payment mode","Modalidad de pago",,
|
||||
"Periodic Invoicing","Facturación periódica",,
|
||||
"Periodic contract","Contrato periódico",,
|
||||
"Please enter a engagement date.","Por favor, introduzca una fecha de compromiso.",,
|
||||
"Please enter a terminated date for this version.","Por favor, introduzca una fecha de finalización para esta versión.",,
|
||||
"Please fill the first period end date and the invoice frequency.","Por favor, rellene la fecha de finalización del primer período y la frecuencia de facturación.",,
|
||||
"Print","Imprimir",,
|
||||
"Prior notice","Aviso previo",,
|
||||
"Prior notice duration","Duración del preaviso",,
|
||||
"Prior notice duration is not respected.","No se respeta la duración del preaviso.",,
|
||||
"Product","Producto",,
|
||||
"Prorate from versions","Prorratear a partir de versiones",,
|
||||
"Prorated Invoice","Factura prorrateada",,
|
||||
"Prorated Starting periods","Períodos de inicio prorrateados",,
|
||||
"Prorated finished periods","Períodos finalizados prorrateados",,
|
||||
"Prorated temporally","Prorrateado temporalmente",,
|
||||
"Protrate temporally","Protrate temporally",,
|
||||
"Purchase orders","Pedidos",,
|
||||
"Put on hold",,,
|
||||
"Qty","Cantidad",,
|
||||
"Quantity","Cantidad",,
|
||||
"Reference","Referencia",,
|
||||
"Renew","Renovar",,
|
||||
"Renewal","Renovación",,
|
||||
"Renewal duration","Duración de la renovación",,
|
||||
"Renewal management","Gestión de renovaciones",,
|
||||
"Run batch","Ejecutar lote",,
|
||||
"Search","Buscar",,
|
||||
"Sequence","Secuencia",,
|
||||
"Show contract","Mostrar contrato",,
|
||||
"Show next version","Mostrar siguiente versión",,
|
||||
"Start date","Fecha de inicio",,
|
||||
"Start of next invoicing period","Inicio del siguiente período de facturación",,
|
||||
"Start of period","Inicio del período",,
|
||||
"Start of period plus",,,
|
||||
"Status","Estado",,
|
||||
"Statut","Estatuto",,
|
||||
"Supplier","Proveedor",,
|
||||
"Supplier contracts","Contratos de proveedores",,
|
||||
"Supposed activation date","Fecha de activación prevista",,
|
||||
"Supposed end date","Fecha de finalización prevista",,
|
||||
"Tacit renewal","Renovación tácita",,
|
||||
"Tax","Impuesto",,
|
||||
"Terminate","Terminar",,
|
||||
"Terminated","Terminado",,
|
||||
"Terminated By","Terminado por",,
|
||||
"Terminated contracts","Contratos rescindidos",,
|
||||
"Terminated date","Fecha de terminación",,
|
||||
"Terminated manually","Cancelado manualmente",,
|
||||
"Termination","Terminación",,
|
||||
"Termination demand date","Fecha de demanda de terminación",,
|
||||
"The company %s doesn't have any configured sequence for contracts","La empresa %s no tiene ninguna secuencia configurada para los contratos",,
|
||||
"The product can't be empty.","El producto no puede estar vacío.",,
|
||||
"There is no contract associated with this version.","No hay ningún contrato asociado a esta versión.",,
|
||||
"To closed","A cerrado",,
|
||||
"Total A.T.I.","I.A.T.A. total.",,
|
||||
"Total W.T.","W.T. total",,
|
||||
"Type","Tipo",,
|
||||
"Unchangable contract","Contrato inalterable",,
|
||||
"Unit","Unidad",,
|
||||
"Unit price","Precio unitario",,
|
||||
"Use this template","Utilice esta plantilla",,
|
||||
"Version","Versión",,
|
||||
"Version history","Historial de versiones",,
|
||||
"Versions","Versiones",,
|
||||
"Waiting","Esperando",,
|
||||
"With engagement","Con compromiso",,
|
||||
"With prior notice","Con previo aviso",,
|
||||
"You cannot remove a line which has been already invoiced.","No se puede eliminar una línea que ya se haya facturado.",,
|
||||
"You cannot terminate a contract before version activation date.","No se puede rescindir un contrato antes de la fecha de activación de la versión.",,
|
||||
"You need to save your contract for add lines.","Necesita guardar su contrato para añadir líneas.",,
|
||||
"value:Contract","valor:Contrato",,
|
||||
|
@ -0,0 +1,201 @@
|
||||
"key","message","comment","context"
|
||||
"Action",,,
|
||||
"Action %s has no Batch implementation.",,,
|
||||
"Actions",,,
|
||||
"Activate","Activer",,
|
||||
"Activated By","Activé par",,
|
||||
"Activation date","Date d'activation",,
|
||||
"Active","Actif",,
|
||||
"Additional Benefit Management","Gestion des prestations additionnelles",,
|
||||
"Additional benefit","Prestations additionelles",,
|
||||
"Additional benefit lines","Lignes de prestations additionelle",,
|
||||
"Additional benefit management","Gestion des prestations additionnelles",,
|
||||
"Advanced","Avancé",,
|
||||
"Amendment management","Gestion des avenants",,
|
||||
"Analytic distribution template","Modèle de répartition analytique",,
|
||||
"Analytic move lines","Lignes d’écriture analytique",,
|
||||
"Analytics",,,
|
||||
"App contract","Application contrat",,
|
||||
"Attention the contract will have as starting date the provisional activation date ${currentContractVersion.supposedActivationDate}, Are you sure?","Attention le contrat aura comme date de début la date d'activation prévisionnelle ${currentContractVersion.supposedActivationDate}, etes-vous sur?",,
|
||||
"Auto enable version on renew","Activer automatiquement la version au renouvellement",,
|
||||
"Automatic invoicing","Facturation automatique",,
|
||||
"Back","Retour",,
|
||||
"Batches",,,
|
||||
"Batchs",,,
|
||||
"Cancel","Annuler",,
|
||||
"Close contract",,,
|
||||
"Closed","Fermé",,
|
||||
"Code",,,
|
||||
"Company","Société",,
|
||||
"Config.","Config. ",,
|
||||
"Configurable contract","Contrat configurable",,
|
||||
"Configuration","Configuration",,
|
||||
"Consumption Line","Ligne de consommation",,
|
||||
"Consumption Lines","Lignes de consommation",,
|
||||
"Consumption for next invoice","Consommation pour prochaine facture",,
|
||||
"Consumption management","Gestion des consommations",,
|
||||
"Consumptions","Consommations",,
|
||||
"Content","Contenu",,
|
||||
"Contract","Contrat",,
|
||||
"Contract Dates","Dates de contrat",,
|
||||
"Contract Line","Ligne de contrat",,
|
||||
"Contract Lines","Lignes de contrat",,
|
||||
"Contract N°","N° de contrat",,
|
||||
"Contract batch","Batch de contrat",,
|
||||
"Contract batches","Batchs de contrat",,
|
||||
"Contract can't be empty for compute contract line price.","Le contrat ne peut pas être vide pour le calcule du prix des lignes.",,
|
||||
"Contract closing invoice","Facture de fin de contrat",,
|
||||
"Contract invoice","Facture de contrat",,
|
||||
"Contract line","Ligne de contrat",,
|
||||
"Contract template","Modèle de contrat",,
|
||||
"Contract template to use","Modèle de contrat à utiliser",,
|
||||
"Contract templates","Modèles de contrat",,
|
||||
"Contract version","Version de contrat",,
|
||||
"Contracts","Contrats",,
|
||||
"Copy","Copier",,
|
||||
"Create PO",,,
|
||||
"Created by","Créé par",,
|
||||
"Created on","Créé le",,
|
||||
"Currency",,,
|
||||
"Current invoice period",,,
|
||||
"Current version","Version courante",,
|
||||
"Current version activation","Activation de la version courante",,
|
||||
"Customer","Client",,
|
||||
"Customer contracts","Contrat client",,
|
||||
"Date","Date",,
|
||||
"Delete","Supprimer",,
|
||||
"Delete next version","Supprimer prochaine version",,
|
||||
"Description","Description",,
|
||||
"Displayed Product name","Libellé produit",,
|
||||
"Do not renew","Ne pas renouveler",,
|
||||
"Do you really wish to fill your contract based on this template ?","Souhaitez-vous vraiment remplir votre contrat sur la base de ce modèle?",,
|
||||
"Draft","Brouillon",,
|
||||
"Duration",,,
|
||||
"Durations",,,
|
||||
"End date","Date de fin",,
|
||||
"End of next invoicing period","Fin de la prochaine période de facturation",,
|
||||
"End of period","Fin de periode",,
|
||||
"End of period plus","Fin de la période plus",,
|
||||
"Engagement","Engagement",,
|
||||
"Engagement duration","Durée d'engagement",,
|
||||
"Engagement duration is not fulfilled.","La durée d'engagement n'est pas respectée.",,
|
||||
"Engagement start date","Date de début d'engagement",,
|
||||
"Engagement start from version","Début d'engagement en fonction des nouvelles version",,
|
||||
"Error","Erreur",,
|
||||
"First period end date","Fin de la première période",,
|
||||
"First period invoicing end date","Date de fin de la première période de facturation",,
|
||||
"Fiscal position","Position fiscal",,
|
||||
"Forecast (contract)","Prévisionnel (contrat)",,
|
||||
"Full name","Nom complet",,
|
||||
"General","Général",,
|
||||
"Information",,,
|
||||
"Informations","Informations",,
|
||||
"Invoice",,,
|
||||
"Invoice from consumption","Facturer en consommation",,
|
||||
"Invoice line",,,
|
||||
"Invoice period","Periode de facturation",,
|
||||
"Invoice period history","Historique des periodes de facturation",,
|
||||
"Invoice periods","Periodes de facturation",,
|
||||
"Invoiced","Facturé",,
|
||||
"Invoices",,,
|
||||
"Invoicing","Facturation",,
|
||||
"Invoicing Frequency","Fréquence de facturation",,
|
||||
"Invoicing content","Contenu de facturation",,
|
||||
"Invoicing date","Date de facturation",,
|
||||
"Invoicing management","Gestion de la facturation",,
|
||||
"Invoicing moment","Moment de facturation",,
|
||||
"Is invoiced","Facturé",,
|
||||
"Last Invoicing period","Dernière période facturée",,
|
||||
"Last renewal date","Dernière date de renouvellement",,
|
||||
"Linked invoice","Facture liée",,
|
||||
"Manage invoices","Gestion de la facturation",,
|
||||
"Meta file","Fichier méta",,
|
||||
"Name","Nom",,
|
||||
"New","Nouveau",,
|
||||
"New version","Nouvelle version",,
|
||||
"Next Invoice Additional Benefit","Prestations additionelles",,
|
||||
"Next version","Prochaine version",,
|
||||
"Next version activation","Activation de prochaine version",,
|
||||
"No contract is associated to version.","Aucun contrat est associé à la version.",,
|
||||
"Not invoiced","Non facturé",,
|
||||
"Notes","Notes",,
|
||||
"Nouvelle version",,,
|
||||
"Number of days","Nombre de jours",,
|
||||
"Number of finished periods","Nombre de périodes terminées",,
|
||||
"Number of renewal","Nombre de renouvellements",,
|
||||
"Ongoing","En cours",,
|
||||
"Only invoice consumption before Invoice period end Date","Facturer uniquement les consommation avant la date de fin de période",,
|
||||
"Partner","Tiers",,
|
||||
"Payment condition","Condition de paiement",,
|
||||
"Payment mode","Mode de paiement",,
|
||||
"Periodic Invoicing","Facturation périodique",,
|
||||
"Periodic contract","Contrat périodique",,
|
||||
"Please enter a engagement date.","Veuillez entrer un date d'engagement.",,
|
||||
"Please enter a terminated date for this version.","Veuillez entrer une date de fin pour cette version.",,
|
||||
"Please fill the first period end date and the invoice frequency.","Veuillez remplir la première date de fin de prériode et la fréquence de facturation.",,
|
||||
"Print","Imprimer",,
|
||||
"Prior notice","Préavis",,
|
||||
"Prior notice duration","Durée de préavis",,
|
||||
"Prior notice duration is not respected.","La durée de préavis n'est pas respectée.",,
|
||||
"Product","Produit",,
|
||||
"Prorate from versions","Proratiser en fonction des versions",,
|
||||
"Prorated Invoice","Proratisation de factures",,
|
||||
"Prorated Starting periods",,,
|
||||
"Prorated finished periods",,,
|
||||
"Prorated temporally",,,
|
||||
"Protrate temporally","Proratiser temporellement",,
|
||||
"Purchase orders",,,
|
||||
"Put on hold","Mettre en attente",,
|
||||
"Qty","Qté",,
|
||||
"Quantity","Quantité",,
|
||||
"Reference","Référence",,
|
||||
"Renew","Renouveler",,
|
||||
"Renewal","Renouvellement",,
|
||||
"Renewal duration","Durée de renouvellement",,
|
||||
"Renewal management","Gestion des renouvellements",,
|
||||
"Run batch",,,
|
||||
"Search","Rechercher",,
|
||||
"Sequence",,,
|
||||
"Show contract","Voir le contrat",,
|
||||
"Show next version","Voir la prochaine version",,
|
||||
"Start date","Date de début",,
|
||||
"Start of next invoicing period","Début de la prochaine période de facturation",,
|
||||
"Start of period","Début de période",,
|
||||
"Start of period plus","Début de la période plus un",,
|
||||
"Status","Statut",,
|
||||
"Statut","Statut",,
|
||||
"Supplier","Fournisseur",,
|
||||
"Supplier contracts","Contrat fournisseur",,
|
||||
"Supposed activation date","Date d'activation prévisionnelle",,
|
||||
"Supposed end date","Date de fin prévisionnelle",,
|
||||
"Tacit renewal","Renouvellement tacite",,
|
||||
"Tax","Taxe",,
|
||||
"Terminate","Résilier",,
|
||||
"Terminated","Clôturé",,
|
||||
"Terminated By","Résilié par",,
|
||||
"Terminated contracts","Contrats clos",,
|
||||
"Terminated date","Date de clôture",,
|
||||
"Terminated manually","Résilié manuellement",,
|
||||
"Termination","Clôture",,
|
||||
"Termination demand date","Date de demande de résiliation",,
|
||||
"The company %s doesn't have any configured sequence for contracts",,,
|
||||
"The product can't be empty.","Le produit ne peut pas être nul.",,
|
||||
"There is no contract associated with this version.",,,
|
||||
"To closed","A clôturer",,
|
||||
"Total A.T.I.","Total T.T.C",,
|
||||
"Total W.T.","Total HT",,
|
||||
"Type","Type",,
|
||||
"Unchangable contract","Contrat non modifiable",,
|
||||
"Unit","Unité",,
|
||||
"Unit price","Prix unitaire",,
|
||||
"Use this template","Utiliser ce modèle",,
|
||||
"Version","Version",,
|
||||
"Version history","Historique des versions",,
|
||||
"Versions","Versions",,
|
||||
"Waiting","En attente",,
|
||||
"With engagement","Avec engagement",,
|
||||
"With prior notice","Avec préavis",,
|
||||
"You cannot remove a line which has been already invoiced.","Vous ne pouvez pas supprimer une ligne qui a été facturé.",,
|
||||
"You cannot terminate a contract before version activation date.","Vous ne pouvez pas terminer un contrat avant la date d'activitation de la version.",,
|
||||
"You need to save your contract for add lines.","Vous devez sauvegarder votre contrat pour ajouter des lignes.",,
|
||||
"value:Contract","Contrat",,
|
||||
|
@ -0,0 +1,201 @@
|
||||
"key","message","comment","context"
|
||||
"Action","Azione",,
|
||||
"Action %s has no Batch implementation.","L'azione %s non ha un'implementazione Batch.",,
|
||||
"Actions","Azioni",,
|
||||
"Activate",,,
|
||||
"Activated By","Attivato da",,
|
||||
"Activation date","Data di attivazione",,
|
||||
"Active","Attivo",,
|
||||
"Additional Benefit Management","Gestione dei benefici aggiuntivi",,
|
||||
"Additional benefit","Vantaggio supplementare",,
|
||||
"Additional benefit lines","Linee di prestazioni supplementari",,
|
||||
"Additional benefit management","Gestione delle prestazioni complementari",,
|
||||
"Advanced","Avanzate",,
|
||||
"Amendment management","Gestione degli emendamenti",,
|
||||
"Analytic distribution template",,,
|
||||
"Analytic move lines",,,
|
||||
"Analytics",,,
|
||||
"App contract","Contratto App",,
|
||||
"Attention the contract will have as starting date the provisional activation date ${currentContractVersion.supposedActivationDate}, Are you sure?","Attenzione, il contratto avrà come data di inizio la data di attivazione provvisoria ${currentContractVersion.supposedActivationDate}, sei sicuro?",,
|
||||
"Auto enable version on renew","Versione di abilitazione automatica al rinnovo",,
|
||||
"Automatic invoicing","Fatturazione automatica",,
|
||||
"Back","Indietro",,
|
||||
"Batches","Partite",,
|
||||
"Batchs","Lotti",,
|
||||
"Cancel","Annulla",,
|
||||
"Close contract",,,
|
||||
"Closed","Chiuso",,
|
||||
"Code","Codice",,
|
||||
"Company","L'azienda",,
|
||||
"Config.","Config.",,
|
||||
"Configurable contract","Contratto configurabile",,
|
||||
"Configuration","Configurazione",,
|
||||
"Consumption Line","Linea di consumo",,
|
||||
"Consumption Lines","Linee di consumo",,
|
||||
"Consumption for next invoice","Consumo per la prossima fattura",,
|
||||
"Consumption management","Gestione dei consumi",,
|
||||
"Consumptions","Presupposti",,
|
||||
"Content","Contenuto",,
|
||||
"Contract","Contratto",,
|
||||
"Contract Dates","Date del contratto",,
|
||||
"Contract Line","Linea Contract",,
|
||||
"Contract Lines","Linee di contratto",,
|
||||
"Contract N°","Numero di contratto",,
|
||||
"Contract batch","Lotto del contratto",,
|
||||
"Contract batches","Lotti a contratto",,
|
||||
"Contract can't be empty for compute contract line price.","Il contratto non può essere vuoto per calcolare il prezzo della linea di contratto.",,
|
||||
"Contract closing invoice","Fattura di chiusura del contratto",,
|
||||
"Contract invoice","Fattura del contratto",,
|
||||
"Contract line","Linea Contract",,
|
||||
"Contract template","Modello di contratto",,
|
||||
"Contract template to use","Modello di contratto da utilizzare",,
|
||||
"Contract templates","Modelli di contratto",,
|
||||
"Contract version","Versione del contratto",,
|
||||
"Contracts","Contratti",,
|
||||
"Copy","Copia",,
|
||||
"Create PO","Creare un ordine di acquisto",,
|
||||
"Created by","Creato da",,
|
||||
"Created on","Creato su",,
|
||||
"Currency","Valuta",,
|
||||
"Current invoice period","Periodo di fatturazione corrente",,
|
||||
"Current version","Versione corrente",,
|
||||
"Current version activation","Attivazione versione corrente",,
|
||||
"Customer","Cliente",,
|
||||
"Customer contracts","Contratti con i clienti",,
|
||||
"Date","Data",,
|
||||
"Delete","Cancellare",,
|
||||
"Delete next version","Cancella la prossima versione",,
|
||||
"Description","Descrizione",,
|
||||
"Displayed Product name","Visualizzazione del nome del prodotto",,
|
||||
"Do not renew","Non rinnovare",,
|
||||
"Do you really wish to fill your contract based on this template ?","Vuoi davvero riempire il tuo contratto sulla base di questo modello?",,
|
||||
"Draft","Bozza",,
|
||||
"Duration","Durata",,
|
||||
"Durations","Durata",,
|
||||
"End date","Data di fine",,
|
||||
"End of next invoicing period","Fine del prossimo periodo di fatturazione",,
|
||||
"End of period","Fine del periodo",,
|
||||
"End of period plus",,,
|
||||
"Engagement","Impegno",,
|
||||
"Engagement duration","Durata dell'impegno",,
|
||||
"Engagement duration is not fulfilled.","La durata dell'impegno non è rispettata.",,
|
||||
"Engagement start date","Data di inizio dell'impegno",,
|
||||
"Engagement start from version","Inizio impegno a partire dalla versione",,
|
||||
"Error","Errore",,
|
||||
"First period end date","Data di scadenza del primo periodo",,
|
||||
"First period invoicing end date","Primo periodo di fatturazione data di scadenza",,
|
||||
"Fiscal position","Posizione fiscale",,
|
||||
"Forecast (contract)",,,
|
||||
"Full name","Nome e cognome",,
|
||||
"General","In generale",,
|
||||
"Information","Informazioni",,
|
||||
"Informations","Informazioni",,
|
||||
"Invoice","Fattura",,
|
||||
"Invoice from consumption","Fattura da consumo",,
|
||||
"Invoice line","Linea fattura",,
|
||||
"Invoice period","Periodo di fatturazione",,
|
||||
"Invoice period history","Storia del periodo della fattura",,
|
||||
"Invoice periods","Periodi di fatturazione",,
|
||||
"Invoiced","Fatturato",,
|
||||
"Invoices","Fatture",,
|
||||
"Invoicing","Fatturazione",,
|
||||
"Invoicing Frequency","Frequenza di fatturazione",,
|
||||
"Invoicing content","Contenuto della fatturazione",,
|
||||
"Invoicing date","Data di fatturazione",,
|
||||
"Invoicing management","Gestione della fatturazione",,
|
||||
"Invoicing moment","Momento di fatturazione",,
|
||||
"Is invoiced","Viene fatturata",,
|
||||
"Last Invoicing period","Ultimo periodo di fatturazione",,
|
||||
"Last renewal date","Data dell'ultimo rinnovo",,
|
||||
"Linked invoice","Fattura collegata",,
|
||||
"Manage invoices","Gestire le fatture",,
|
||||
"Meta file","Meta file",,
|
||||
"Name","Nome",,
|
||||
"New","Nuovo",,
|
||||
"New version","Nuova versione",,
|
||||
"Next Invoice Additional Benefit","Vantaggio aggiuntivo della prossima fattura",,
|
||||
"Next version","Prossima versione",,
|
||||
"Next version activation","Attivazione della prossima versione",,
|
||||
"No contract is associated to version.","Nessun contratto è associato alla versione.",,
|
||||
"Not invoiced","Non fatturata",,
|
||||
"Notes","Note",,
|
||||
"Nouvelle version","Versione Nouvelle",,
|
||||
"Number of days",,,
|
||||
"Number of finished periods","Numero di periodi finiti",,
|
||||
"Number of renewal","Numero di rinnovo",,
|
||||
"Ongoing","In corso",,
|
||||
"Only invoice consumption before Invoice period end Date","Solo consumo di fatture prima della fine del periodo di fatturazione Data",,
|
||||
"Partner","Partner",,
|
||||
"Payment condition","Condizioni di pagamento",,
|
||||
"Payment mode","Modalità di pagamento",,
|
||||
"Periodic Invoicing","Fatturazione periodica",,
|
||||
"Periodic contract","Contratto periodico",,
|
||||
"Please enter a engagement date.","Inserire una data di fidanzamento.",,
|
||||
"Please enter a terminated date for this version.","Inserire una data di scadenza per questa versione.",,
|
||||
"Please fill the first period end date and the invoice frequency.","Si prega di compilare la data di scadenza del primo periodo e la frequenza della fattura.",,
|
||||
"Print","Stampa",,
|
||||
"Prior notice","Preavviso",,
|
||||
"Prior notice duration","Durata del preavviso",,
|
||||
"Prior notice duration is not respected.","La durata del preavviso non è rispettata.",,
|
||||
"Product","Prodotto",,
|
||||
"Prorate from versions","Prorate dalle versioni",,
|
||||
"Prorated Invoice","Fattura Prorated Invoice",,
|
||||
"Prorated Starting periods","Prorated Periodi di partenza",,
|
||||
"Prorated finished periods","Proroga dei periodi finiti",,
|
||||
"Prorated temporally","Prorata temporalmente",,
|
||||
"Protrate temporally","Protrate temporalmente",,
|
||||
"Purchase orders","Ordini d'acquisto",,
|
||||
"Put on hold",,,
|
||||
"Qty","Qtà",,
|
||||
"Quantity","Quantità",,
|
||||
"Reference","Riferimento",,
|
||||
"Renew","Rinnovare",,
|
||||
"Renewal","Rinnovo",,
|
||||
"Renewal duration","Durata del rinnovo",,
|
||||
"Renewal management","Gestione dei rinnovi",,
|
||||
"Run batch","Esegui lotto",,
|
||||
"Search","Ricerca",,
|
||||
"Sequence","Sequenza",,
|
||||
"Show contract","Mostra contratto",,
|
||||
"Show next version","Mostra la prossima versione",,
|
||||
"Start date","Data d'inizio",,
|
||||
"Start of next invoicing period","Inizio del prossimo periodo di fatturazione",,
|
||||
"Start of period","Inizio del periodo",,
|
||||
"Start of period plus",,,
|
||||
"Status","Stato",,
|
||||
"Statut","Statut",,
|
||||
"Supplier","Fornitore",,
|
||||
"Supplier contracts","Contratti con i fornitori",,
|
||||
"Supposed activation date","Data di attivazione presunta",,
|
||||
"Supposed end date","Data di fine supposta",,
|
||||
"Tacit renewal","Rinnovo tacito",,
|
||||
"Tax","Tassa di soggiorno",,
|
||||
"Terminate","Terminare",,
|
||||
"Terminated","Terminato",,
|
||||
"Terminated By","Terminato da",,
|
||||
"Terminated contracts","Contratti risolti",,
|
||||
"Terminated date","Data di scadenza",,
|
||||
"Terminated manually","Terminato manualmente",,
|
||||
"Termination","Cessazione",,
|
||||
"Termination demand date","Data di cessazione della domanda",,
|
||||
"The company %s doesn't have any configured sequence for contracts","L'azienda %s non ha alcuna sequenza configurata per i contratti",,
|
||||
"The product can't be empty.","Il prodotto non può essere vuoto.",,
|
||||
"There is no contract associated with this version.","Non esiste un contratto associato a questa versione.",,
|
||||
"To closed","A chiuso",,
|
||||
"Total A.T.I.","Totale A.T.I.T.T.I.",,
|
||||
"Total W.T.","Totale W.T.",,
|
||||
"Type","Tipo",,
|
||||
"Unchangable contract","Contratto immutabile",,
|
||||
"Unit","Unità",,
|
||||
"Unit price","Prezzo unitario",,
|
||||
"Use this template","Usa questo modello",,
|
||||
"Version","Versione",,
|
||||
"Version history","Storia delle versioni",,
|
||||
"Versions","Versioni",,
|
||||
"Waiting","Aspettando",,
|
||||
"With engagement","Con impegno",,
|
||||
"With prior notice","Con preavviso",,
|
||||
"You cannot remove a line which has been already invoiced.","Non è possibile rimuovere una riga che è già stata fatturata.",,
|
||||
"You cannot terminate a contract before version activation date.","Non è possibile recedere da un contratto prima della data di attivazione della versione.",,
|
||||
"You need to save your contract for add lines.","È necessario salvare il contratto per le linee aggiuntive.",,
|
||||
"value:Contract","valore:Contratto",,
|
||||
|
@ -0,0 +1,201 @@
|
||||
"key","message","comment","context"
|
||||
"Action","Actie",,
|
||||
"Action %s has no Batch implementation.","Actie %s heeft geen batchimplementatie.",,
|
||||
"Actions","Acties",,
|
||||
"Activate",,,
|
||||
"Activated By","Geactiveerd door",,
|
||||
"Activation date","Activeringsdatum",,
|
||||
"Active","Actief",,
|
||||
"Additional Benefit Management","Beheer van extra voordelen",,
|
||||
"Additional benefit","Bijkomend voordeel",,
|
||||
"Additional benefit lines","Bijkomende voordeel lijnen",,
|
||||
"Additional benefit management","Bijkomend beheer van de voordelen",,
|
||||
"Advanced","Gevorderden",,
|
||||
"Amendment management","Beheer van wijzigingen",,
|
||||
"Analytic distribution template",,,
|
||||
"Analytic move lines",,,
|
||||
"Analytics",,,
|
||||
"App contract","App contract",,
|
||||
"Attention the contract will have as starting date the provisional activation date ${currentContractVersion.supposedActivationDate}, Are you sure?","Let op het contract heeft als ingangsdatum de voorlopige activeringsdatum ${currentContractVersion.supposedActivationDate}, bent u zeker?",,
|
||||
"Auto enable version on renew","Auto enable versie op vernieuwen",,
|
||||
"Automatic invoicing","Automatische facturatie",,
|
||||
"Back","Terug",,
|
||||
"Batches","Batches",,
|
||||
"Batchs","Partijen",,
|
||||
"Cancel","Annuleren",,
|
||||
"Close contract",,,
|
||||
"Closed","Gesloten",,
|
||||
"Code","Code",,
|
||||
"Company","Bedrijf",,
|
||||
"Config.","Config.",,
|
||||
"Configurable contract","Configureerbaar contract",,
|
||||
"Configuration","Configuratie",,
|
||||
"Consumption Line","Verbruikslijn",,
|
||||
"Consumption Lines","Verbruikslijnen",,
|
||||
"Consumption for next invoice","Verbruik voor de volgende factuur",,
|
||||
"Consumption management","Beheer van het verbruik",,
|
||||
"Consumptions","Verbruik",,
|
||||
"Content","Inhoud",,
|
||||
"Contract","Contract",,
|
||||
"Contract Dates","Contract Data",,
|
||||
"Contract Line","Contract Lijn",,
|
||||
"Contract Lines","Contractlijnen",,
|
||||
"Contract N°","Contract nr.",,
|
||||
"Contract batch","Contractpartij",,
|
||||
"Contract batches","Contractpartijen",,
|
||||
"Contract can't be empty for compute contract line price.","Contract kan niet leeg zijn voor het berekenen van de contractlijnprijs.",,
|
||||
"Contract closing invoice","Contractsluitingsfactuur",,
|
||||
"Contract invoice","Contractfactuur",,
|
||||
"Contract line","Contractlijn",,
|
||||
"Contract template","Contractsjabloon",,
|
||||
"Contract template to use","Contractsjabloon te gebruiken",,
|
||||
"Contract templates","Contractsjablonen",,
|
||||
"Contract version","Contractversie",,
|
||||
"Contracts","Contracten",,
|
||||
"Copy","Kopiëren",,
|
||||
"Create PO","PO aanmaken",,
|
||||
"Created by","Gemaakt door",,
|
||||
"Created on","Gemaakt op",,
|
||||
"Currency","Valuta",,
|
||||
"Current invoice period","Huidige factuurperiode",,
|
||||
"Current version","Huidige versie",,
|
||||
"Current version activation","Activering van de huidige versie",,
|
||||
"Customer","Klant",,
|
||||
"Customer contracts","Contracten van klanten",,
|
||||
"Date","Datum",,
|
||||
"Delete","Schrappen",,
|
||||
"Delete next version","Volgende versie verwijderen",,
|
||||
"Description","Beschrijving",,
|
||||
"Displayed Product name","Weergegeven productnaam",,
|
||||
"Do not renew","Niet verlengen",,
|
||||
"Do you really wish to fill your contract based on this template ?","Wenst u echt uw contract in te vullen op basis van dit sjabloon?",,
|
||||
"Draft","Ontwerp",,
|
||||
"Duration","Duur",,
|
||||
"Durations","Duraties",,
|
||||
"End date","Einddatum",,
|
||||
"End of next invoicing period","Einde van de volgende factureringsperiode",,
|
||||
"End of period","Einde periode",,
|
||||
"End of period plus",,,
|
||||
"Engagement","Engagement",,
|
||||
"Engagement duration","Duur van de overeenkomst",,
|
||||
"Engagement duration is not fulfilled.","De duur van de opdracht is niet vervuld.",,
|
||||
"Engagement start date","Aanvangsdatum van de overeenkomst",,
|
||||
"Engagement start from version","Engagement start vanaf versie",,
|
||||
"Error","Fout",,
|
||||
"First period end date","Einddatum van de eerste periode",,
|
||||
"First period invoicing end date","Eerste periode facturering einddatum",,
|
||||
"Fiscal position","Fiscale positie",,
|
||||
"Forecast (contract)",,,
|
||||
"Full name","Volledige naam",,
|
||||
"General","Algemeen",,
|
||||
"Information","Informatie",,
|
||||
"Informations","Informatie",,
|
||||
"Invoice","Factuur",,
|
||||
"Invoice from consumption","Factuur van consumptie",,
|
||||
"Invoice line","Factuurlijn",,
|
||||
"Invoice period","Factuurperiode",,
|
||||
"Invoice period history","Factuurperiode geschiedenis",,
|
||||
"Invoice periods","Factuurperiodes",,
|
||||
"Invoiced","Gefactureerd",,
|
||||
"Invoices","Facturen",,
|
||||
"Invoicing","Facturatie",,
|
||||
"Invoicing Frequency","Factureringsfrequentie",,
|
||||
"Invoicing content","Facturatie-inhoud",,
|
||||
"Invoicing date","Factureringsdatum",,
|
||||
"Invoicing management","Facturatiebeheer",,
|
||||
"Invoicing moment","Facturatiemoment",,
|
||||
"Is invoiced","Wordt gefactureerd",,
|
||||
"Last Invoicing period","Laatste factureringsperiode",,
|
||||
"Last renewal date","Laatste verlengingsdatum",,
|
||||
"Linked invoice","Gekoppelde factuur",,
|
||||
"Manage invoices","Facturen beheren",,
|
||||
"Meta file","Metabestand",,
|
||||
"Name","Naam",,
|
||||
"New","Nieuw",,
|
||||
"New version","Nieuwe versie",,
|
||||
"Next Invoice Additional Benefit","Volgende factuur extra voordeel",,
|
||||
"Next version","Volgende versie",,
|
||||
"Next version activation","Volgende versie activering",,
|
||||
"No contract is associated to version.","Aan de versie is geen contract verbonden.",,
|
||||
"Not invoiced","Niet gefactureerd",,
|
||||
"Notes","Opmerkingen",,
|
||||
"Nouvelle version","Nouvelle versie",,
|
||||
"Number of days",,,
|
||||
"Number of finished periods","Aantal voltooide perioden",,
|
||||
"Number of renewal","Aantal verlengingen",,
|
||||
"Ongoing","Lopend",,
|
||||
"Only invoice consumption before Invoice period end Date","Alleen factuurverbruik voor het einde van de factuurperiode Einddatum",,
|
||||
"Partner","Partner",,
|
||||
"Payment condition","Betalingsconditie",,
|
||||
"Payment mode","Betaalwijze",,
|
||||
"Periodic Invoicing","Periodieke facturering",,
|
||||
"Periodic contract","Periodiek contract",,
|
||||
"Please enter a engagement date.","Vul een verlovingsdatum in.",,
|
||||
"Please enter a terminated date for this version.","Voer een einddatum in voor deze versie.",,
|
||||
"Please fill the first period end date and the invoice frequency.","Vul de eerste einddatum van de periode en de factuurfrequentie in.",,
|
||||
"Print","Afdrukken",,
|
||||
"Prior notice","Voorafgaande kennisgeving",,
|
||||
"Prior notice duration","Duur van de voorafgaande kennisgeving",,
|
||||
"Prior notice duration is not respected.","De duur van de voorafgaande kennisgeving wordt niet in acht genomen.",,
|
||||
"Product","Product",,
|
||||
"Prorate from versions","Prorata van versies",,
|
||||
"Prorated Invoice","Geproportioneerde factuur",,
|
||||
"Prorated Starting periods","Geproportioneerde startperiodes",,
|
||||
"Prorated finished periods","Geproportioneerde voltooide periodes",,
|
||||
"Prorated temporally","Geproportioneerd in de tijd",,
|
||||
"Protrate temporally","Protrate tijdelijk",,
|
||||
"Purchase orders","Inkooporders",,
|
||||
"Put on hold",,,
|
||||
"Qty","Qty",,
|
||||
"Quantity","Hoeveelheid",,
|
||||
"Reference","Referentie",,
|
||||
"Renew","Vernieuwen",,
|
||||
"Renewal","Vernieuwing",,
|
||||
"Renewal duration","Verlengingsduur",,
|
||||
"Renewal management","Vernieuwingsbeheer",,
|
||||
"Run batch","Lopende partij",,
|
||||
"Search","Zoeken",,
|
||||
"Sequence","Volgorde",,
|
||||
"Show contract","Toon contract",,
|
||||
"Show next version","Toon volgende versie",,
|
||||
"Start date","Startdatum",,
|
||||
"Start of next invoicing period","Begin van de volgende factureringsperiode",,
|
||||
"Start of period","Begin van de periode",,
|
||||
"Start of period plus",,,
|
||||
"Status","Status",,
|
||||
"Statut","Statut",,
|
||||
"Supplier","Leverancier",,
|
||||
"Supplier contracts","Contracten met leveranciers",,
|
||||
"Supposed activation date","Veronderstelde activeringsdatum",,
|
||||
"Supposed end date","Veronderstelde einddatum",,
|
||||
"Tacit renewal","Stilzwijgende verlenging",,
|
||||
"Tax","Belasting",,
|
||||
"Terminate","Beëindigen",,
|
||||
"Terminated","Beëindigd",,
|
||||
"Terminated By","Beëindigd door",,
|
||||
"Terminated contracts","Beëindigde contracten",,
|
||||
"Terminated date","Beëindigde datum",,
|
||||
"Terminated manually","Handmatig beëindigd",,
|
||||
"Termination","Beëindiging",,
|
||||
"Termination demand date","Opzegging vraag datum",,
|
||||
"The company %s doesn't have any configured sequence for contracts","Het bedrijf %s heeft geen geconfigureerde volgorde voor contracten",,
|
||||
"The product can't be empty.","Het product mag niet leeg zijn.",,
|
||||
"There is no contract associated with this version.","Aan deze versie is geen contract verbonden.",,
|
||||
"To closed","Naar gesloten",,
|
||||
"Total A.T.I.","Totaal A.T.I.",,
|
||||
"Total W.T.","Totaal W.T.",,
|
||||
"Type","Type",,
|
||||
"Unchangable contract","Onveranderlijk contract",,
|
||||
"Unit","Eenheid",,
|
||||
"Unit price","Eenheidsprijs",,
|
||||
"Use this template","Gebruik deze sjabloon",,
|
||||
"Version","Versie",,
|
||||
"Version history","Versie geschiedenis",,
|
||||
"Versions","Versies",,
|
||||
"Waiting","Wachten",,
|
||||
"With engagement","Met engagement",,
|
||||
"With prior notice","Met voorafgaande kennisgeving",,
|
||||
"You cannot remove a line which has been already invoiced.","U kunt een regel die al gefactureerd is niet verwijderen.",,
|
||||
"You cannot terminate a contract before version activation date.","U kunt een contract niet vóór de activeringsdatum van de versie opzeggen.",,
|
||||
"You need to save your contract for add lines.","U dient uw contract op te slaan voor het toevoegen van lijnen.",,
|
||||
"value:Contract","waarde: Contract",,
|
||||
|
@ -0,0 +1,201 @@
|
||||
"key","message","comment","context"
|
||||
"Action","Działanie",,
|
||||
"Action %s has no Batch implementation.","Działanie %s nie ma realizacji partii.",,
|
||||
"Actions","Działania",,
|
||||
"Activate",,,
|
||||
"Activated By","Aktywowany przez",,
|
||||
"Activation date","Data aktywacji",,
|
||||
"Active","Aktywny",,
|
||||
"Additional Benefit Management","Zarządzanie dodatkowymi korzyściami",,
|
||||
"Additional benefit","Dodatkowa korzyść",,
|
||||
"Additional benefit lines","Dodatkowe linie korzyści",,
|
||||
"Additional benefit management","Zarządzanie dodatkowymi korzyściami",,
|
||||
"Advanced","Zaawansowane",,
|
||||
"Amendment management","Zarządzanie zmianami",,
|
||||
"Analytic distribution template",,,
|
||||
"Analytic move lines",,,
|
||||
"Analytics",,,
|
||||
"App contract","Umowa App",,
|
||||
"Attention the contract will have as starting date the provisional activation date ${currentContractVersion.supposedActivationDate}, Are you sure?","Zwróć uwagę, że umowa będzie miała jako datę rozpoczęcia tymczasową datę aktywacji ${currentContractractVersion.supposedActivationDate}, Czy jesteś pewien?",,
|
||||
"Auto enable version on renew","Automatyczne włączanie wersji po odnowieniu",,
|
||||
"Automatic invoicing","Automatyczne fakturowanie",,
|
||||
"Back","Tył",,
|
||||
"Batches","Partie",,
|
||||
"Batchs","Partie",,
|
||||
"Cancel","Anulowanie",,
|
||||
"Close contract",,,
|
||||
"Closed","Zamknięta",,
|
||||
"Code","Kod",,
|
||||
"Company","Firma",,
|
||||
"Config.","Konfiguracja.",,
|
||||
"Configurable contract","Konfigurowalna umowa",,
|
||||
"Configuration","Konfiguracja",,
|
||||
"Consumption Line","Linia konsumpcji",,
|
||||
"Consumption Lines","Linie zużycia",,
|
||||
"Consumption for next invoice","Konsumpcja na potrzeby kolejnej faktury",,
|
||||
"Consumption management","Zarządzanie konsumpcją",,
|
||||
"Consumptions","Konsumpcje",,
|
||||
"Content","Zawartość",,
|
||||
"Contract","Kontrakt",,
|
||||
"Contract Dates","Terminy umów",,
|
||||
"Contract Line","Linia kontraktowa",,
|
||||
"Contract Lines","Linie kontraktowe",,
|
||||
"Contract N°","Kontrakt nr",,
|
||||
"Contract batch","Partia kontraktowa",,
|
||||
"Contract batches","Partie kontraktowe",,
|
||||
"Contract can't be empty for compute contract line price.","Umowa nie może być pusta, aby obliczyć cenę wiersza umowy.",,
|
||||
"Contract closing invoice","Faktura zamknięcia umowy",,
|
||||
"Contract invoice","Faktura kontraktowa",,
|
||||
"Contract line","Linia kontraktowa",,
|
||||
"Contract template","Wzór umowy",,
|
||||
"Contract template to use","Wzór umowy do wykorzystania",,
|
||||
"Contract templates","Wzory umów",,
|
||||
"Contract version","Wersja umowy",,
|
||||
"Contracts","Umowy",,
|
||||
"Copy","Kopiuj",,
|
||||
"Create PO","Utwórz PO",,
|
||||
"Created by","Stworzony przez",,
|
||||
"Created on","Utworzony na",,
|
||||
"Currency","Waluta",,
|
||||
"Current invoice period","Okres fakturowania bieżącego",,
|
||||
"Current version","Aktualna wersja",,
|
||||
"Current version activation","Aktywacja aktualnej wersji.",,
|
||||
"Customer","Klient",,
|
||||
"Customer contracts","Umowy z klientami",,
|
||||
"Date","Data",,
|
||||
"Delete","Skreślenie",,
|
||||
"Delete next version","Usuń następną wersję",,
|
||||
"Description","Opis",,
|
||||
"Displayed Product name","Wyświetlana nazwa produktu",,
|
||||
"Do not renew","Nie odnawiaj.",,
|
||||
"Do you really wish to fill your contract based on this template ?","Czy naprawdę chcesz wypełnić umowę w oparciu o ten szablon?",,
|
||||
"Draft","Wstępny projekt",,
|
||||
"Duration","Czas trwania pomocy",,
|
||||
"Durations","Czas trwania",,
|
||||
"End date","Data końcowa",,
|
||||
"End of next invoicing period","Koniec kolejnego okresu fakturowania",,
|
||||
"End of period","Koniec okresu",,
|
||||
"End of period plus",,,
|
||||
"Engagement","Zaangażowanie",,
|
||||
"Engagement duration","Czas trwania zaangażowania",,
|
||||
"Engagement duration is not fulfilled.","Czas trwania zaangażowania nie jest spełniony.",,
|
||||
"Engagement start date","Data rozpoczęcia zaangażowania",,
|
||||
"Engagement start from version","Rozpoczęcie pracy od wersji",,
|
||||
"Error","Błąd",,
|
||||
"First period end date","Data zakończenia pierwszego okresu",,
|
||||
"First period invoicing end date","Data zakończenia fakturowania za pierwszy okres",,
|
||||
"Fiscal position","Pozycja fiskalna",,
|
||||
"Forecast (contract)",,,
|
||||
"Full name","Pełne imię i nazwisko",,
|
||||
"General","Uwagi ogólne",,
|
||||
"Information","Informacje",,
|
||||
"Informations","Informacje",,
|
||||
"Invoice","Faktura",,
|
||||
"Invoice from consumption","Faktura z konsumpcji",,
|
||||
"Invoice line","Linia faktur",,
|
||||
"Invoice period","Okres fakturowania",,
|
||||
"Invoice period history","Historia okresu fakturowania",,
|
||||
"Invoice periods","Okresy fakturowania",,
|
||||
"Invoiced","Zafakturowany",,
|
||||
"Invoices","Faktury",,
|
||||
"Invoicing","Fakturowanie",,
|
||||
"Invoicing Frequency","Fakturowanie Częstotliwość",,
|
||||
"Invoicing content","Zawartość faktur",,
|
||||
"Invoicing date","Data wystawienia faktury",,
|
||||
"Invoicing management","Zarządzanie fakturami",,
|
||||
"Invoicing moment","Moment fakturowania",,
|
||||
"Is invoiced","Jest zafakturowany",,
|
||||
"Last Invoicing period","Ostatni okres fakturowania",,
|
||||
"Last renewal date","Ostatnia data przedłużenia ważności",,
|
||||
"Linked invoice","Faktura powiązana",,
|
||||
"Manage invoices","Zarządzanie fakturami",,
|
||||
"Meta file","Plik meta",,
|
||||
"Name","Nazwa",,
|
||||
"New","Nowy",,
|
||||
"New version","Nowa wersja",,
|
||||
"Next Invoice Additional Benefit","Następna faktura Dodatkowa korzyść",,
|
||||
"Next version","Następna wersja",,
|
||||
"Next version activation","Aktywacja następnej wersji.",,
|
||||
"No contract is associated to version.","Z wersją nie jest związana żadna umowa.",,
|
||||
"Not invoiced","Nie zafakturowane",,
|
||||
"Notes","Uwagi",,
|
||||
"Nouvelle version","Wersja nowości",,
|
||||
"Number of days",,,
|
||||
"Number of finished periods","Liczba zakończonych okresów",,
|
||||
"Number of renewal","Liczba odnowień",,
|
||||
"Ongoing","W trakcie realizacji",,
|
||||
"Only invoice consumption before Invoice period end Date","Tylko zużycie faktur przed końcem okresu fakturowania Data",,
|
||||
"Partner","Partner",,
|
||||
"Payment condition","Warunek płatności",,
|
||||
"Payment mode","Tryb płatności",,
|
||||
"Periodic Invoicing","Fakturowanie okresowe",,
|
||||
"Periodic contract","Umowa okresowa",,
|
||||
"Please enter a engagement date.","Proszę wpisać datę zaangażowania.",,
|
||||
"Please enter a terminated date for this version.","Proszę podać datę zakończenia tej wersji.",,
|
||||
"Please fill the first period end date and the invoice frequency.","Proszę wpisać datę zakończenia pierwszego okresu i częstotliwość wystawiania faktur.",,
|
||||
"Print","Drukuj",,
|
||||
"Prior notice","Uprzednie powiadomienie",,
|
||||
"Prior notice duration","Czas trwania uprzedniego powiadomienia",,
|
||||
"Prior notice duration is not respected.","Nie przestrzega się okresu uprzedniego powiadomienia.",,
|
||||
"Product","Produkt",,
|
||||
"Prorate from versions","Proporcjonalnie od wersji",,
|
||||
"Prorated Invoice","Faktura prorated",,
|
||||
"Prorated Starting periods","Proporcjonalne okresy rozruchu",,
|
||||
"Prorated finished periods","Procentowe okresy zakończone",,
|
||||
"Prorated temporally","Proporcjonalnie czasowo",,
|
||||
"Protrate temporally","Czasowo",,
|
||||
"Purchase orders","Zamówienia zakupu",,
|
||||
"Put on hold",,,
|
||||
"Qty","Ilość",,
|
||||
"Quantity","Ilość",,
|
||||
"Reference","Odniesienie",,
|
||||
"Renew","Odnowienie",,
|
||||
"Renewal","Odnowienie",,
|
||||
"Renewal duration","Okres przedłużenia",,
|
||||
"Renewal management","Odnowienie zarządzania",,
|
||||
"Run batch","Uruchomić partię",,
|
||||
"Search","Wyszukiwanie",,
|
||||
"Sequence","Kolejność",,
|
||||
"Show contract","Pokaż kontrakt",,
|
||||
"Show next version","Pokaż następną wersję.",,
|
||||
"Start date","Data początkowa",,
|
||||
"Start of next invoicing period","Początek kolejnego okresu fakturowania",,
|
||||
"Start of period","Początek okresu",,
|
||||
"Start of period plus",,,
|
||||
"Status","Status",,
|
||||
"Statut","Statut",,
|
||||
"Supplier","Dostawca",,
|
||||
"Supplier contracts","Umowy z dostawcami",,
|
||||
"Supposed activation date","Podejrzewana data aktywacji",,
|
||||
"Supposed end date","Podobna data końcowa",,
|
||||
"Tacit renewal","Odnowienie Tacit",,
|
||||
"Tax","Podatek",,
|
||||
"Terminate","Wypowiedzenie",,
|
||||
"Terminated","Wypowiedziane",,
|
||||
"Terminated By","Wypowiedziane przez",,
|
||||
"Terminated contracts","Umowy rozwiązane",,
|
||||
"Terminated date","Data końcowa",,
|
||||
"Terminated manually","Zakończone ręcznie",,
|
||||
"Termination","Wygaśnięcie",,
|
||||
"Termination demand date","Data żądania rozwiązania umowy",,
|
||||
"The company %s doesn't have any configured sequence for contracts","Firma %s nie posiada skonfigurowanej sekwencji kontraktów",,
|
||||
"The product can't be empty.","Produkt nie może być pusty.",,
|
||||
"There is no contract associated with this version.","Z tą wersją nie jest związana żadna umowa.",,
|
||||
"To closed","Do zamknięcia",,
|
||||
"Total A.T.I.","Ogółem A.T.I.",,
|
||||
"Total W.T.","Ogółem W.T.",,
|
||||
"Type","Typ",,
|
||||
"Unchangable contract","Umowa niezmienna",,
|
||||
"Unit","Jednostka",,
|
||||
"Unit price","Cena jednostkowa",,
|
||||
"Use this template","Użyj tego szablonu",,
|
||||
"Version","Wersja",,
|
||||
"Version history","Historia wersji",,
|
||||
"Versions","Wersje",,
|
||||
"Waiting","Oczekiwanie",,
|
||||
"With engagement","Z zaangażowaniem",,
|
||||
"With prior notice","Po uprzednim powiadomieniu",,
|
||||
"You cannot remove a line which has been already invoiced.","Nie można usunąć linii, która została już zafakturowana.",,
|
||||
"You cannot terminate a contract before version activation date.","Nie można rozwiązać umowy przed datą aktywacji wersji.",,
|
||||
"You need to save your contract for add lines.","Musisz zapisać swój kontrakt na dodawanie linii.",,
|
||||
"value:Contract","wartość: umowa",,
|
||||
|
@ -0,0 +1,201 @@
|
||||
"key","message","comment","context"
|
||||
"Action","Ação",,
|
||||
"Action %s has no Batch implementation.","Ação %s não tem implementação de lote.",,
|
||||
"Actions","Ações",,
|
||||
"Activate",,,
|
||||
"Activated By","Ativado por",,
|
||||
"Activation date","Data de ativação",,
|
||||
"Active","Ativo",,
|
||||
"Additional Benefit Management","Administração de benefícios complementares",,
|
||||
"Additional benefit","Benefício adicional",,
|
||||
"Additional benefit lines","Linhas de benefícios adicionais",,
|
||||
"Additional benefit management","Administração de benefícios adicionais",,
|
||||
"Advanced","Avançado",,
|
||||
"Amendment management","Gestão de alterações",,
|
||||
"Analytic distribution template",,,
|
||||
"Analytic move lines",,,
|
||||
"Analytics",,,
|
||||
"App contract","Contrato do aplicativo",,
|
||||
"Attention the contract will have as starting date the provisional activation date ${currentContractVersion.supposedActivationDate}, Are you sure?","Atenção, o contrato terá como data de início a data de activação provisória ${currentContractVersion.supposedActivationDate}, Tens a certeza?",,
|
||||
"Auto enable version on renew","Ativação automática da versão na renovação",,
|
||||
"Automatic invoicing","Faturamento automático",,
|
||||
"Back","Voltar",,
|
||||
"Batches","Lotes",,
|
||||
"Batchs","Lotes",,
|
||||
"Cancel","Cancelar",,
|
||||
"Close contract",,,
|
||||
"Closed","Fechado",,
|
||||
"Code","Código",,
|
||||
"Company","Empresa",,
|
||||
"Config.","Config.",,
|
||||
"Configurable contract","Contrato configurável",,
|
||||
"Configuration","Configuração",,
|
||||
"Consumption Line","Linha de Consumo",,
|
||||
"Consumption Lines","Linhas de Consumo",,
|
||||
"Consumption for next invoice","Consumo para a próxima fatura",,
|
||||
"Consumption management","Gestão do consumo",,
|
||||
"Consumptions","Consumos",,
|
||||
"Content","Conteúdo",,
|
||||
"Contract","Contrato",,
|
||||
"Contract Dates","Datas do contrato",,
|
||||
"Contract Line","Linha de contrato",,
|
||||
"Contract Lines","Linhas de Contrato",,
|
||||
"Contract N°","Contrato n.º",,
|
||||
"Contract batch","Lote do contrato",,
|
||||
"Contract batches","Lotes de contrato",,
|
||||
"Contract can't be empty for compute contract line price.","O contrato não pode estar vazio para calcular o preço da linha do contrato.",,
|
||||
"Contract closing invoice","Fatura de encerramento do contrato",,
|
||||
"Contract invoice","Fatura de contrato",,
|
||||
"Contract line","Linha de contrato",,
|
||||
"Contract template","Modelo de contrato",,
|
||||
"Contract template to use","Modelo de contrato a utilizar",,
|
||||
"Contract templates","Modelos de contrato",,
|
||||
"Contract version","Versão do contrato",,
|
||||
"Contracts","Contratos",,
|
||||
"Copy","Copiar",,
|
||||
"Create PO","Criar pedido",,
|
||||
"Created by","Criado por",,
|
||||
"Created on","Criado em",,
|
||||
"Currency","Moeda",,
|
||||
"Current invoice period","Período atual da fatura",,
|
||||
"Current version","Versão atual",,
|
||||
"Current version activation","Ativação da versão atual",,
|
||||
"Customer","Cliente",,
|
||||
"Customer contracts","Contratos com clientes",,
|
||||
"Date","Data",,
|
||||
"Delete","Eliminar",,
|
||||
"Delete next version","Eliminar a próxima versão",,
|
||||
"Description","Descrição do produto",,
|
||||
"Displayed Product name","Nome do produto exibido",,
|
||||
"Do not renew","Não renovar",,
|
||||
"Do you really wish to fill your contract based on this template ?","Você realmente deseja preencher o seu contrato com base neste modelo?",,
|
||||
"Draft","Rascunho",,
|
||||
"Duration","Duração",,
|
||||
"Durations","Durações",,
|
||||
"End date","Data final",,
|
||||
"End of next invoicing period","Fim do próximo período de faturamento",,
|
||||
"End of period","Fim do período",,
|
||||
"End of period plus",,,
|
||||
"Engagement","Compromisso",,
|
||||
"Engagement duration","Duração do compromisso",,
|
||||
"Engagement duration is not fulfilled.","A duração do compromisso não é cumprida.",,
|
||||
"Engagement start date","Data de início do compromisso",,
|
||||
"Engagement start from version","Início do compromisso a partir da versão",,
|
||||
"Error","Erro",,
|
||||
"First period end date","Data final do primeiro período",,
|
||||
"First period invoicing end date","Data final do primeiro período de faturamento",,
|
||||
"Fiscal position","Posição fiscal",,
|
||||
"Forecast (contract)",,,
|
||||
"Full name","Nome completo",,
|
||||
"General","Generalidades",,
|
||||
"Information","Informação",,
|
||||
"Informations","Informações",,
|
||||
"Invoice","Fatura",,
|
||||
"Invoice from consumption","Fatura do consumo",,
|
||||
"Invoice line","Linha de fatura",,
|
||||
"Invoice period","Período da fatura",,
|
||||
"Invoice period history","Histórico do período da fatura",,
|
||||
"Invoice periods","Períodos de facturação",,
|
||||
"Invoiced","Faturação",,
|
||||
"Invoices","Facturas",,
|
||||
"Invoicing","Facturação",,
|
||||
"Invoicing Frequency","Freqüência de faturamento",,
|
||||
"Invoicing content","Conteúdo da facturação",,
|
||||
"Invoicing date","Data de faturamento",,
|
||||
"Invoicing management","Gestão da facturação",,
|
||||
"Invoicing moment","Momento da facturação",,
|
||||
"Is invoiced","É faturado",,
|
||||
"Last Invoicing period","Último período de faturamento",,
|
||||
"Last renewal date","Data da última renovação",,
|
||||
"Linked invoice","Fatura vinculada",,
|
||||
"Manage invoices","Administrar faturas",,
|
||||
"Meta file","Meta arquivo",,
|
||||
"Name","Nome e Sobrenome",,
|
||||
"New","Novo",,
|
||||
"New version","Nova versão",,
|
||||
"Next Invoice Additional Benefit","Próximo benefício adicional da fatura",,
|
||||
"Next version","Próxima versão",,
|
||||
"Next version activation","Ativação da próxima versão",,
|
||||
"No contract is associated to version.","Nenhum contrato está associado à versão.",,
|
||||
"Not invoiced","Não faturado",,
|
||||
"Notes","Notas",,
|
||||
"Nouvelle version","Nova versão",,
|
||||
"Number of days",,,
|
||||
"Number of finished periods","Número de períodos terminados",,
|
||||
"Number of renewal","Número de renovações",,
|
||||
"Ongoing","Em curso",,
|
||||
"Only invoice consumption before Invoice period end Date","Apenas o consumo de notas fiscais antes do final do período da nota fiscal Data final",,
|
||||
"Partner","Parceiro",,
|
||||
"Payment condition","Condição de pagamento",,
|
||||
"Payment mode","Modo de pagamento",,
|
||||
"Periodic Invoicing","Faturamento periódico",,
|
||||
"Periodic contract","Contrato periódico",,
|
||||
"Please enter a engagement date.","Por favor, digite uma data de noivado.",,
|
||||
"Please enter a terminated date for this version.","Digite uma data de término para esta versão.",,
|
||||
"Please fill the first period end date and the invoice frequency.","Por favor, preencha a data final do primeiro período e a frequência de facturação.",,
|
||||
"Print","Imprimir",,
|
||||
"Prior notice","Aviso prévio",,
|
||||
"Prior notice duration","Duração do aviso prévio",,
|
||||
"Prior notice duration is not respected.","A duração do aviso prévio não é respeitada.",,
|
||||
"Product","Produto",,
|
||||
"Prorate from versions","Prorate de versões",,
|
||||
"Prorated Invoice","Fatura proporcional",,
|
||||
"Prorated Starting periods","Prorated Períodos de início",,
|
||||
"Prorated finished periods","Períodos finais rateados",,
|
||||
"Prorated temporally","Prorated temporally",,
|
||||
"Protrate temporally","Protrair temporalmente",,
|
||||
"Purchase orders","Pedidos de compra",,
|
||||
"Put on hold",,,
|
||||
"Qty","Quantidade",,
|
||||
"Quantity","Quantidade",,
|
||||
"Reference","Referência",,
|
||||
"Renew","Renovar",,
|
||||
"Renewal","Renovação",,
|
||||
"Renewal duration","Duração da renovação",,
|
||||
"Renewal management","Gerenciamento de renovação",,
|
||||
"Run batch","Executar lote",,
|
||||
"Search","Pesquisar",,
|
||||
"Sequence","Seqüência",,
|
||||
"Show contract","Mostrar contrato",,
|
||||
"Show next version","Mostrar próxima versão",,
|
||||
"Start date","Data de início",,
|
||||
"Start of next invoicing period","Início do próximo período de faturamento",,
|
||||
"Start of period","Início do período",,
|
||||
"Start of period plus",,,
|
||||
"Status","Estado",,
|
||||
"Statut","Estátua",,
|
||||
"Supplier","Fornecedor",,
|
||||
"Supplier contracts","Contratos com fornecedores",,
|
||||
"Supposed activation date","Data de ativação suposta",,
|
||||
"Supposed end date","Data final suposta",,
|
||||
"Tacit renewal","Renovação tácita",,
|
||||
"Tax","Tributário",,
|
||||
"Terminate","Terminar",,
|
||||
"Terminated","Terminado",,
|
||||
"Terminated By","Terminado por",,
|
||||
"Terminated contracts","Contratos rescindidos",,
|
||||
"Terminated date","Data de término",,
|
||||
"Terminated manually","Cancelado manualmente",,
|
||||
"Termination","Rescisão",,
|
||||
"Termination demand date","Data da solicitação de rescisão",,
|
||||
"The company %s doesn't have any configured sequence for contracts","A empresa %s não possui nenhuma seqüência configurada para contratos",,
|
||||
"The product can't be empty.","O produto não pode estar vazio.",,
|
||||
"There is no contract associated with this version.","Não há contrato associado a esta versão.",,
|
||||
"To closed","Para fechar",,
|
||||
"Total A.T.I.","Total A.T.I.",,
|
||||
"Total W.T.","T.I.T. total",,
|
||||
"Type","Tipo de",,
|
||||
"Unchangable contract","Contrato imutável",,
|
||||
"Unit","Unidade",,
|
||||
"Unit price","Preço unitário",,
|
||||
"Use this template","Use este modelo",,
|
||||
"Version","Versão",,
|
||||
"Version history","Histórico de versões",,
|
||||
"Versions","Versões",,
|
||||
"Waiting","Aguardando",,
|
||||
"With engagement","Com compromisso",,
|
||||
"With prior notice","Com aviso prévio",,
|
||||
"You cannot remove a line which has been already invoiced.","Não é possível remover uma linha que já tenha sido faturada.",,
|
||||
"You cannot terminate a contract before version activation date.","Não é possível rescindir um contrato antes da data de ativação da versão.",,
|
||||
"You need to save your contract for add lines.","Você precisa salvar seu contrato para adicionar linhas.",,
|
||||
"value:Contract","valor:Contrato",,
|
||||
|
@ -0,0 +1,201 @@
|
||||
"key","message","comment","context"
|
||||
"Action","Действие",,
|
||||
"Action %s has no Batch implementation.","Действие %s не имеет пакетной реализации.",,
|
||||
"Actions","Действия",,
|
||||
"Activate",,,
|
||||
"Activated By","Активировано По",,
|
||||
"Activation date","Дата активации",,
|
||||
"Active","Активный",,
|
||||
"Additional Benefit Management","Управление дополнительными льготами",,
|
||||
"Additional benefit","Дополнительное преимущество",,
|
||||
"Additional benefit lines","Дополнительные льготные линии",,
|
||||
"Additional benefit management","Управление дополнительными льготами",,
|
||||
"Advanced","Расширенный",,
|
||||
"Amendment management","Управление изменениями",,
|
||||
"Analytic distribution template",,,
|
||||
"Analytic move lines",,,
|
||||
"Analytics",,,
|
||||
"App contract","Контракт на приложение",,
|
||||
"Attention the contract will have as starting date the provisional activation date ${currentContractVersion.supposedActivationDate}, Are you sure?","Внимание, что контракт будет иметь в качестве даты начала предварительной активации ${текущийContractVersion.ПредполагаемаяДата Активации}, вы уверены?",,
|
||||
"Auto enable version on renew","Автоматическое включение версии при обновлении",,
|
||||
"Automatic invoicing","Автоматическое выставление счетов",,
|
||||
"Back","Назад",,
|
||||
"Batches","Пакеты",,
|
||||
"Batchs","Пакеты",,
|
||||
"Cancel","Отмена",,
|
||||
"Close contract",,,
|
||||
"Closed","Закрытый",,
|
||||
"Code","Код",,
|
||||
"Company","Компания",,
|
||||
"Config.","Конфигурация.",,
|
||||
"Configurable contract","Конфигурируемый контракт",,
|
||||
"Configuration","Конфигурация",,
|
||||
"Consumption Line","Линия потребления",,
|
||||
"Consumption Lines","Линии потребления",,
|
||||
"Consumption for next invoice","Потребление для следующего счета-фактуры",,
|
||||
"Consumption management","Управление потреблением",,
|
||||
"Consumptions","Предположения",,
|
||||
"Content","Содержание",,
|
||||
"Contract","Контракт",,
|
||||
"Contract Dates","Даты заключения контракта",,
|
||||
"Contract Line","Контрактная линия",,
|
||||
"Contract Lines","Контрактные линии",,
|
||||
"Contract N°","Контракт N°",,
|
||||
"Contract batch","Контрактная партия",,
|
||||
"Contract batches","Контрактные партии",,
|
||||
"Contract can't be empty for compute contract line price.","Контракт не может быть пустым для расчета контрактной цены линии.",,
|
||||
"Contract closing invoice","Счёт на закрытие контракта",,
|
||||
"Contract invoice","Счет-фактура по контракту",,
|
||||
"Contract line","Контрактная линия",,
|
||||
"Contract template","Шаблон договора",,
|
||||
"Contract template to use","Шаблон договора для использования",,
|
||||
"Contract templates","Шаблоны контрактов",,
|
||||
"Contract version","Контрактная версия",,
|
||||
"Contracts","Контракты",,
|
||||
"Copy","Копировать",,
|
||||
"Create PO","Создать PO",,
|
||||
"Created by","Созданный",,
|
||||
"Created on","Созданный на",,
|
||||
"Currency","Валюта",,
|
||||
"Current invoice period","Текущий фактурный период",,
|
||||
"Current version","Текущая версия",,
|
||||
"Current version activation","Активация текущей версии",,
|
||||
"Customer","Клиент",,
|
||||
"Customer contracts","Клиентские договоры",,
|
||||
"Date","Дата",,
|
||||
"Delete","Удалить",,
|
||||
"Delete next version","Удалить следующую версию",,
|
||||
"Description","Описание",,
|
||||
"Displayed Product name","Отображаемое название продукта",,
|
||||
"Do not renew","Не продлевать",,
|
||||
"Do you really wish to fill your contract based on this template ?","Вы действительно хотите заполнить свой контракт на основе этого шаблона?",,
|
||||
"Draft","Проект",,
|
||||
"Duration","Продолжительность",,
|
||||
"Durations","Продолжительность",,
|
||||
"End date","Дата окончания",,
|
||||
"End of next invoicing period","Конец следующего фактурного периода",,
|
||||
"End of period","Конец периода",,
|
||||
"End of period plus",,,
|
||||
"Engagement","Помолвка",,
|
||||
"Engagement duration","Продолжительность помолвки",,
|
||||
"Engagement duration is not fulfilled.","Продолжительность боев не соблюдается.",,
|
||||
"Engagement start date","Дата начала помолвки",,
|
||||
"Engagement start from version","Задание начинается с версии",,
|
||||
"Error","Ошибка",,
|
||||
"First period end date","Дата окончания первого периода",,
|
||||
"First period invoicing end date","Дата окончания выставления счета за первый период",,
|
||||
"Fiscal position","Финансовая позиция",,
|
||||
"Forecast (contract)",,,
|
||||
"Full name","Полное имя",,
|
||||
"General","Генерал",,
|
||||
"Information","Информация",,
|
||||
"Informations","Информация",,
|
||||
"Invoice","Счет",,
|
||||
"Invoice from consumption","Счет от потребления",,
|
||||
"Invoice line","Счет-фактура",,
|
||||
"Invoice period","Счет-фактура",,
|
||||
"Invoice period history","История фактурного периода",,
|
||||
"Invoice periods","Счетные периоды",,
|
||||
"Invoiced","Счета",,
|
||||
"Invoices","Счета",,
|
||||
"Invoicing","выставление счетов",,
|
||||
"Invoicing Frequency","Частота выставления счетов-фактур",,
|
||||
"Invoicing content","Содержание выставления счетов",,
|
||||
"Invoicing date","Дата выставления счёта",,
|
||||
"Invoicing management","Управление выставлением счетов",,
|
||||
"Invoicing moment","Момент выставления счёта",,
|
||||
"Is invoiced","выставлен счет",,
|
||||
"Last Invoicing period","Последний период выставления счетов",,
|
||||
"Last renewal date","Дата последнего продления",,
|
||||
"Linked invoice","Связанный счёт-фактура",,
|
||||
"Manage invoices","Управление счетами-фактурами",,
|
||||
"Meta file","мета-файл",,
|
||||
"Name","Имя",,
|
||||
"New","Новый",,
|
||||
"New version","Новая версия",,
|
||||
"Next Invoice Additional Benefit","Следующий счет-фактура Дополнительная выгода",,
|
||||
"Next version","Следующая версия",,
|
||||
"Next version activation","Активация следующей версии",,
|
||||
"No contract is associated to version.","Никакой контракт не связан с версией.",,
|
||||
"Not invoiced","Не выставлен счет",,
|
||||
"Notes","Примечания",,
|
||||
"Nouvelle version","Версия Нувеля",,
|
||||
"Number of days",,,
|
||||
"Number of finished periods","Количество завершенных периодов",,
|
||||
"Number of renewal","Количество продлений",,
|
||||
"Ongoing","Текущий",,
|
||||
"Only invoice consumption before Invoice period end Date","Только потребление по счету до окончания фактурного периода Дата окончания фактурного периода",,
|
||||
"Partner","Партнер",,
|
||||
"Payment condition","Условие оплаты",,
|
||||
"Payment mode","Режим оплаты",,
|
||||
"Periodic Invoicing","Периодическое выставление счетов",,
|
||||
"Periodic contract","Периодический контракт",,
|
||||
"Please enter a engagement date.","Пожалуйста, введите дату помолвки.",,
|
||||
"Please enter a terminated date for this version.","Пожалуйста, укажите дату окончания срока действия данной версии.",,
|
||||
"Please fill the first period end date and the invoice frequency.","Пожалуйста, заполните дату окончания первого периода и укажите частоту выставления счета.",,
|
||||
"Print","Печать",,
|
||||
"Prior notice","Предварительное уведомление",,
|
||||
"Prior notice duration","Длительность предварительного уведомления",,
|
||||
"Prior notice duration is not respected.","Срок предварительного уведомления не соблюдается.",,
|
||||
"Product","Продукт",,
|
||||
"Prorate from versions","Пропорционально версиям",,
|
||||
"Prorated Invoice","Пропорциональный счет-фактура",,
|
||||
"Prorated Starting periods","Пропорционально Начальные периоды",,
|
||||
"Prorated finished periods","Пропорционально законченные периоды",,
|
||||
"Prorated temporally","Пропорционально временной",,
|
||||
"Protrate temporally","Височно вытянуть.",,
|
||||
"Purchase orders","Заказы на поставку",,
|
||||
"Put on hold",,,
|
||||
"Qty","Количество",,
|
||||
"Quantity","Количество",,
|
||||
"Reference","Ссылка",,
|
||||
"Renew","Обновить",,
|
||||
"Renewal","Обновление",,
|
||||
"Renewal duration","Продолжительность продления",,
|
||||
"Renewal management","Управление обновлением",,
|
||||
"Run batch","Запустить партию",,
|
||||
"Search","Поиск",,
|
||||
"Sequence","Последовательность",,
|
||||
"Show contract","Показать контракт",,
|
||||
"Show next version","Показать следующую версию",,
|
||||
"Start date","Дата начала",,
|
||||
"Start of next invoicing period","Начало следующего фактурного периода",,
|
||||
"Start of period","Начало периода",,
|
||||
"Start of period plus",,,
|
||||
"Status","Статус",,
|
||||
"Statut","Статут",,
|
||||
"Supplier","Поставщик",,
|
||||
"Supplier contracts","Договоры с поставщиками",,
|
||||
"Supposed activation date","Предполагаемая дата активации",,
|
||||
"Supposed end date","Предполагаемая дата окончания",,
|
||||
"Tacit renewal","Обновление такситов",,
|
||||
"Tax","Налог",,
|
||||
"Terminate","Прекратить",,
|
||||
"Terminated","Прекращено",,
|
||||
"Terminated By","Прекращено",,
|
||||
"Terminated contracts","Расторгнутые контракты",,
|
||||
"Terminated date","Дата прекращения",,
|
||||
"Terminated manually","Прекращено вручную",,
|
||||
"Termination","Прекращение",,
|
||||
"Termination demand date","Дата прекращения действия требования",,
|
||||
"The company %s doesn't have any configured sequence for contracts","В %s компании нет никакой заданной последовательности для контрактов.",,
|
||||
"The product can't be empty.","Товар не может быть пустым.",,
|
||||
"There is no contract associated with this version.","Контракт с этой версией не связан.",,
|
||||
"To closed","Чтобы закрыть",,
|
||||
"Total A.T.I.","Всего А.Т.И.",,
|
||||
"Total W.T.","Всего W.T.",,
|
||||
"Type","Тип",,
|
||||
"Unchangable contract","Неизменный контракт",,
|
||||
"Unit","Подразделение",,
|
||||
"Unit price","Цена единицы",,
|
||||
"Use this template","Используйте этот шаблон",,
|
||||
"Version","Версия",,
|
||||
"Version history","История версий",,
|
||||
"Versions","Версии",,
|
||||
"Waiting","Жду",,
|
||||
"With engagement","С помолвкой",,
|
||||
"With prior notice","С предварительным уведомлением",,
|
||||
"You cannot remove a line which has been already invoiced.","Вы не можете удалить уже выставленную к оплате строку.",,
|
||||
"You cannot terminate a contract before version activation date.","Вы не можете расторгнуть контракт до даты активации версии.",,
|
||||
"You need to save your contract for add lines.","Вам нужно сохранить свой контракт на добавление строк.",,
|
||||
"value:Contract","стоимость:Контракт",,
|
||||
|
@ -0,0 +1,21 @@
|
||||
<?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="contract_role.csv" separator=";" type="com.axelor.auth.db.Role" search="self.name = :name"/>
|
||||
|
||||
<input file="contract_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="contract_metaMenu.csv" separator=";" type="com.axelor.meta.db.MetaMenu" search="self.name = :name" update="true">
|
||||
<bind column="roles" to="roles" search="self.name in :roles" eval="roles.split('\\|') as List"/>
|
||||
</input>
|
||||
|
||||
</csv-inputs>
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
"name";"roles"
|
||||
"contracts-root";"Contract Manager|Contract User|Contract Read"
|
||||
"contracts-root-customer-all";"Contract Manager|Contract User|Contract Read"
|
||||
"contracts-root-supplier-all";"Contract Manager|Contract User|Contract Read"
|
||||
"contracts-root-conf-all";"Contract Manager"
|
||||
"contracts-root-conf-terminated";"Contract Manager"
|
||||
"contract-template-all";"Contract Manager"
|
||||
"duration-all";"Contract Manager"
|
||||
|
@ -0,0 +1,19 @@
|
||||
"name";"object";"can_read";"can_write";"can_create";"can_remove";"can_export";"condition";"conditionParams";"roleName"
|
||||
"perm.contract.ContractVersion.r";"com.axelor.apps.contract.db.ContractVersion";"x";;;;;;;"Contract Read"
|
||||
"perm.contract.Contract.r";"com.axelor.apps.contract.db.Contract";"x";;;;;"self.company.id in (?)";"__user__.companySet.id.plus(0)";"Contract Read"
|
||||
"perm.contract.ContractLine.r";"com.axelor.apps.contract.db.ContractLine";"x";;;;;;;"Contract Read"
|
||||
"perm.contract.ConsumptionLine.r";"com.axelor.apps.contract.db.ConsumptionLine";"x";;;;;;;"Contract Read"
|
||||
"perm.contract.ContractTemplate.r";"com.axelor.apps.contract.db.ContractTemplate";"x";;;;;"self.company.id in (?)";"__user__.companySet.id.plus(0)";"Contract Read"
|
||||
"perm.contract.InvoicePeriod.r";"com.axelor.apps.contract.db.InvoicePeriod";"x";;;;;;;"Contract Read"
|
||||
"perm.contract.ContractVersion.rwc";"com.axelor.apps.contract.db.ContractVersion";"x";"x";"x";;;;;"Contract User"
|
||||
"perm.contract.Contract.rwc";"com.axelor.apps.contract.db.Contract";"x";"x";"x";;;"self.company.id in (?)";"__user__.companySet.id.plus(0)";"Contract User"
|
||||
"perm.contract.ContractLine.rwc";"com.axelor.apps.contract.db.ContractLine";"x";"x";"x";;;;;"Contract User"
|
||||
"perm.contract.ConsumptionLine.rwc";"com.axelor.apps.contract.db.ConsumptionLine";"x";"x";"x";;;;;"Contract User"
|
||||
"perm.contract.ContractTemplate.rwc";"com.axelor.apps.contract.db.ContractTemplate";"x";"x";"x";;;"self.company.id in (?)";"__user__.companySet.id.plus(0)";"Contract User"
|
||||
"perm.contract.InvoicePeriod.rwc";"com.axelor.apps.contract.db.InvoicePeriod";"x";"x";"x";;;;;"Contract User"
|
||||
"perm.contract.ContractVersion.rwcde";"com.axelor.apps.contract.db.ContractVersion";"x";"x";"x";"x";"x";;;"Contract Manager"
|
||||
"perm.contract.Contract.rwcde";"com.axelor.apps.contract.db.Contract";"x";"x";"x";"x";"x";"self.company.id in (?)";"__user__.companySet.id.plus(0)";"Contract Manager"
|
||||
"perm.contract.ContractLine.rwcde";"com.axelor.apps.contract.db.ContractLine";"x";"x";"x";"x";"x";;;"Contract Manager"
|
||||
"perm.contract.ConsumptionLine.rwcde";"com.axelor.apps.contract.db.ConsumptionLine";"x";"x";"x";"x";"x";;;"Contract Manager"
|
||||
"perm.contract.ContractTemplate.rwcde";"com.axelor.apps.contract.db.ContractTemplate";"x";"x";"x";"x";"x";"self.company.id in (?)";"__user__.companySet.id.plus(0)";"Contract Manager"
|
||||
"perm.contract.InvoicePeriod.rwcde";"com.axelor.apps.contract.db.InvoicePeriod";"x";"x";"x";"x";"x";;;"Contract Manager"
|
||||
|
@ -0,0 +1,4 @@
|
||||
"name";"description"
|
||||
"Contract Read";
|
||||
"Contract User";
|
||||
"Contract Manager";
|
||||
|
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<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="app-contract-config-form" title="App contract" model="com.axelor.apps.base.db.AppContract" width="large">
|
||||
<toolbar>
|
||||
<button name="newBtn" title="New" hidden="true"/>
|
||||
<button name="deleteBtn" title="Delete" hidden="true"/>
|
||||
<button name="backBtn" title="Back" hidden="true"/>
|
||||
<button name="copyBtn" title="Copy" hidden="true"/>
|
||||
<button name="searchBtn" title="Search" hidden="true"/>
|
||||
</toolbar>
|
||||
<panel name="mainPanel">
|
||||
<panel name="generalPanel" title="General" colSpan="12">
|
||||
<field name="isUnchangableContract" colSpan="4" widget="boolean-switch"/>
|
||||
<field name="isAmendmentManagement" colSpan="4" widget="boolean-switch"/>
|
||||
</panel>
|
||||
<panel name="advancedPanel" title="Advanced" colSpan="12">
|
||||
<field name="isConfigContract" colSpan="4" widget="boolean-switch"/>
|
||||
<field name="isRenewalManagement" colSpan="4" widget="boolean-switch" hidden="true" showIf="isConfigContract"/>
|
||||
</panel>
|
||||
<panel name="invoicingPanel" title="Invoicing" colSpan="12" hidden="true" showIf="isConfigContract">
|
||||
<field name="isInvoicingManagement" colSpan="4" widget="boolean-switch"/>
|
||||
<field name="isConsumptionManagement" colSpan="4" widget="boolean-switch" hidden="true" showIf="isInvoicingManagement"/>
|
||||
<field name="isAdditionalBenefitManagement" colSpan="4" widget="boolean-switch" hidden="true" showIf="isInvoicingManagement"/>
|
||||
</panel>
|
||||
</panel>
|
||||
|
||||
<panel-mail name="mailPanel">
|
||||
<mail-messages limit="4"/>
|
||||
<mail-followers/>
|
||||
</panel-mail>
|
||||
</form>
|
||||
|
||||
|
||||
</object-views>
|
||||
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<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">
|
||||
|
||||
<grid name="consumption-line-grid" title="Consumption Lines"
|
||||
model="com.axelor.apps.contract.db.ConsumptionLine"
|
||||
orderBy="lineDate">
|
||||
<hilite if="isError" background="danger"/>
|
||||
<hilite if="isInvoiced" background="success"/>
|
||||
<field name="lineDate"/>
|
||||
<field name="reference"/>
|
||||
<field name="product"/>
|
||||
<field name="qty"/>
|
||||
<field name="unit"/>
|
||||
<field name="isInvoiced" hidden="true"/>
|
||||
<field name="isError" hidden="true"/>
|
||||
</grid>
|
||||
|
||||
<form name="consumption-line-form" title="Consumption Line"
|
||||
model="com.axelor.apps.contract.db.ConsumptionLine">
|
||||
<panel readonlyIf="isInvoiced" name="mainPanel">
|
||||
<field name="product" required="true" canEdit="false"
|
||||
onChange="action-consumption-line-method-change-product"/>
|
||||
<field name="lineDate" required="true"/>
|
||||
<field name="reference"/>
|
||||
<field name="unit" canEdit="false"/>
|
||||
<field name="qty"/>
|
||||
<field name="isInvoiced" readonly="true" colSpan="3"/>
|
||||
<field name="isError" readonly="true" colSpan="3"/>
|
||||
</panel>
|
||||
</form>
|
||||
|
||||
<action-method name="action-consumption-line-method-change-product">
|
||||
<call class="com.axelor.apps.contract.web.ConsumptionLineController"
|
||||
method="changeProduct"/>
|
||||
</action-method>
|
||||
|
||||
</object-views>
|
||||
@ -0,0 +1,405 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<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">
|
||||
|
||||
<grid name="contract-grid" title="Contracts" model="com.axelor.apps.contract.db.Contract">
|
||||
<field name="contractId" width="120"/>
|
||||
<field name="name"/>
|
||||
<field name="targetTypeSelect"/>
|
||||
<field name="company" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
|
||||
<field name="partner"/>
|
||||
<field name="startDate"/>
|
||||
<field name="supposedEndDate"/>
|
||||
<field name="statusSelect"/>
|
||||
</grid>
|
||||
|
||||
<form name="contract-form" title="Contract" model="com.axelor.apps.contract.db.Contract" width="large" readonlyIf="statusSelect == 3"
|
||||
onNew="action-contract-record-default"
|
||||
onLoad="action-contract-group-on-load"
|
||||
onSave="action-contract-method-is-valid">
|
||||
<toolbar>
|
||||
<button name="printContractBtn" title="Print" hidden="true" icon="fa-print" onClick="notImplementedYet"/>
|
||||
</toolbar>
|
||||
<panel name="mainPanel">
|
||||
<panel colSpan="9" name="generalInfoPanel">
|
||||
<field name="currentContractVersion.statusSelect" showTitle="false" readonly="true" colSpan="6" widget="NavSelect"/>
|
||||
<field name="$viewerTags" showTitle="false" readonly="true" colSpan="6">
|
||||
<viewer depends="targetTypeSelect,statusSelect,contractId,versionNumber"><![CDATA[
|
||||
<h3 class="text-right">
|
||||
<span style="margin-right: 10px;"><span x-translate>Contract</span><span ng-show="record.contractId"> - {{ record.contractId }} <span ng-show="record.versionNumber > 0"> - {{ record.versionNumber }}</span></span></span>
|
||||
|
||||
<span class="label label-info" x-translate ng-show="record.targetTypeSelect == 1">Customer</span>
|
||||
<span class="label label-warning" x-translate ng-show="record.targetTypeSelect == 2">Supplier</span>
|
||||
|
||||
<span class="label label-default" x-translate ng-show="record.statusSelect == 1">Draft</span>
|
||||
<span class="label label-info" x-translate ng-show="record.statusSelect == 2">Active</span>
|
||||
<span class="label label-important" x-translate ng-show="record.statusSelect == 3">Closed</span>
|
||||
</h3>
|
||||
]]></viewer>
|
||||
</field>
|
||||
<field name="company" readonlyIf="statusSelect >= 2" canEdit="false" colSpan="4"/>
|
||||
<field name="partner" colSpan="4" onSelect="action-contract-attrs-domains-partner" showIf="targetTypeSelect" readonlyIf="statusSelect >= 2" canEdit="false" onChange="action-contract-attrs-partner-payment-config" required="true" form-view="partner-form"/>
|
||||
<field if="__config__.app.getApp('contract').getIsInvoicingManagement()" colSpan="4" name="currency" readonlyIf="statusSelect >= 2" canEdit="false"/>
|
||||
<field name="name" colSpan="12" css="highlight" hideIf="$readonly() && !name && statusSelect >= 2"/>
|
||||
<field name="project" colSpan="8" domain="self.clientPartner=:partner"/>
|
||||
<panel name="contractDatesPanel" title="Contract Dates" hidden="true" showIf="id" colSpan="12">
|
||||
<field name="createdOn" colSpan="3"/>
|
||||
<field name="createdBy" colSpan="3"/>
|
||||
<field name="startDate" readonly="true" showIf="statusSelect >= 2" colSpan="3"/>
|
||||
<field name="endDate" hidden="true" showIf="statusSelect == 3" colSpan="3"/>
|
||||
</panel>
|
||||
<panel name="currentVersionPanel" title="Current version" colSpan="12">
|
||||
<field name="currentContractVersion" showTitle="false" colSpan="12" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<panel colSpan="6">
|
||||
<panel hideIf="statusSelect >= 3" colSpan="12">
|
||||
<field name="supposedActivationDate"/>
|
||||
<field name="supposedEndDate"/>
|
||||
</panel>
|
||||
<panel hidden="true" readonly="true" showIf="statusSelect >= 3" colSpan="12">
|
||||
<field name="activatedByUser" colSpan="4"/>
|
||||
<field name="activationDate" colSpan="4"/>
|
||||
<panel colSpan="4" >
|
||||
<field name="supposedEndDate" hidden="true" readonly="true" showIf="statusSelect == 3" colSpan="12"/>
|
||||
<field name="endDate" hidden="true" readonly="true" showIf="statusSelect == 4" colSpan="12"/>
|
||||
</panel>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel showIf="id" colSpan="6" >
|
||||
<field name="createdOn"/>
|
||||
<field name="createdBy"/>
|
||||
</panel>
|
||||
</editor>
|
||||
</field>
|
||||
<field name="firstPeriodEndDate" title="First period invoicing end date" hidden="true" showIf="statusSelect == 1 && isInvoicingManagement && currentContractVersion.isPeriodicInvoicing" colSpan="3" requiredIf="$get('currentContractVersion.isPeriodicInvoicing')"/>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel colSpan="3" stacked="true" name="actionPanel">
|
||||
<panel name="templatePanel" hidden="true" showIf="statusSelect == 1 || currentContractVersion.statusSelect == 1 || currentContractVersion.statusSelect == 2" stacked="true">
|
||||
<field name="$contractTemplate" title="Contract template to use" type="MANY-TO-ONE" canNew="false" canEdit="false" target="com.axelor.apps.contract.db.ContractTemplate"/>
|
||||
<button name="copyFromTemplateBtn" title="Use this template" showIf="$contractTemplate" prompt="Do you really wish to fill your contract based on this template ?" onClick="save,action-contract-method-copy-from-template"/>
|
||||
</panel>
|
||||
<panel stacked="true" name="btnsPanel">
|
||||
<field name="nextVersion" hidden="true"/>
|
||||
<button if="__config__.app.getApp('contract').isAmendmentManagement" name="newVersionBtn" title="New version" showIf="id && nextVersion == null && currentContractVersion.statusSelect == 3" onClick="save,action-view-contract-add-version,close"/>
|
||||
<button if="__config__.app.getApp('contract').isAmendmentManagement" name="showNextVersionBtn" title="Show next version" showIf="id && nextVersion != null && statusSelect != 3" onClick="save,action-view-contract-show-version,close"/>
|
||||
<button if="__config__.app.getApp('contract').isAmendmentManagement" name="deleteNextVersionBtn" title="Delete next version" showIf="id && nextVersion != null && statusSelect != 3" onClick="save,action-contract-method-delete-next-version"/>
|
||||
<button name="waitingBtn" title="Put on hold" showIf="id && currentContractVersion.statusSelect == 1" onClick="save,action-contract-method-waiting"/>
|
||||
<button name="ongoingBtn" title="Activate" showIf="id && currentContractVersion.statusSelect == 2" onClick="save,action-contract-validate-on-going,action-contract-method-ongoing"/>
|
||||
<button if="__config__.app.getApp('contract').isRenewalManagement" name="renewBtn" title="Renew" hidden="true" showIf="id && currentContractVersion.statusSelect == 3" onClick="save,action-contract-method-renew"/>
|
||||
</panel>
|
||||
<panel title="Notes" stacked="true" name="notesPanel">
|
||||
<field name="note" showTitle="false"/>
|
||||
</panel>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel-tabs name="mainPanelTab">
|
||||
<panel title="Content" name="contentPanel">
|
||||
<label name="saveLabel" title="You need to save your contract for add lines." hidden="true" showIf="isInvoicingManagement && !id" css="label-bold font-red"/>
|
||||
<panel name="contractLineListPanel" hidden="true" showIf="isInvoicingManagement" colSpan="12">
|
||||
<field name="currentContractVersion" showTitle="false" colSpan="12" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="false">
|
||||
<field name="contractLineList" showTitle="false" colSpan="12" form-view="contract-line-form" grid-view="contract-line-grid"/>
|
||||
</editor>
|
||||
</field>
|
||||
</panel>
|
||||
<field name="consumptionLineList" showIf="isConsumptionManagement" readonlyIf="!id" colSpan="12" form-view="consumption-line-form" grid-view="consumption-line-grid"/>
|
||||
<field name="additionalBenefitContractLineList" showIf="isAdditionaBenefitManagement" readonlyIf="!id" colSpan="12" form-view="additional-contract-line-form" grid-view="additional-contract-line-grid"/>
|
||||
<panel name="currentContractVersionDescriptionPanel" colSpan="12">
|
||||
<field name="currentContractVersion" showTitle="false" colSpan="12" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<field name="description" colSpan="9" widget="html"/>
|
||||
<field name="metaFile" colSpan="3" widget="binary-link"/>
|
||||
</editor>
|
||||
</field>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel name="invoicingPanel" title="Invoicing" hidden="true" showIf="isInvoicingManagement && statusSelect >= 2">
|
||||
<field name="invoicePeriodStartDate" showIf="currentContractVersion.isPeriodicInvoicing" colSpan="4"/>
|
||||
<field name="invoicePeriodEndDate" showIf="currentContractVersion.isPeriodicInvoicing" colSpan="4"/>
|
||||
<field name="invoicingDate" colSpan="4"/>
|
||||
<button name="invoicingBtn" title="Invoicing" showIf="id && currentContractVersion.statusSelect == 3" onClick="save,action-contract-method-invoicing"/>
|
||||
<panel-dashlet name="contractInvoicingPanel" readonly="false" colSpan="12" height="350" action="action-contract-view-invoicing"/>
|
||||
</panel>
|
||||
<panel name="terminationPanel" title="Termination" hidden="true" showIf="statusSelect != 1" onTabSelect="action-contract-attrs-show-close-btn">
|
||||
<panel name="renewalPanel" if="__config__.app.getApp('contract').getIsRenewalManagement()" title="Renewal" hidden="true" showIf="currentContractVersion.statusSelect == 3 && (renewalNumber > 0 || currentContractVersion.isTacitRenewal)" colSpan="12">
|
||||
<field name="renewalNumber" hidden="true" readonly="true" showIf="renewalNumber > 0"/>
|
||||
<field name="lastRenewalDate" hidden="true" readonly="true" showIf="renewalNumber > 0"/>
|
||||
<field name="currentContractVersion" showTitle="false" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<field name="doNotRenew" colSpan="12"/>
|
||||
</editor>
|
||||
</field>
|
||||
</panel>
|
||||
<panel name="terminatePanel" title="Terminate" colSpan="12">
|
||||
<panel colSpan="12">
|
||||
<button name="closeContractBtn" title="Close contract" onClick="action-contract-method-close" hidden="true" colSpan="3"/>
|
||||
</panel>
|
||||
<field name="terminatedDate" readonlyIf="terminatedManually" colSpan="3"/>
|
||||
<panel name="terminationInfoPanel" colSpan="9">
|
||||
<panel name="terminationDetailPanel" hidden="true" showIf="terminatedManually" colSpan="12">
|
||||
<field name="terminatedByUser" readonly="true" colSpan="4"/>
|
||||
<field name="terminationDemandDate" hidden="true" readonly="true" showIf="terminationDemandDate" colSpan="4"/>
|
||||
<field name="terminatedManually" hidden="true" readonly="true" showIf="terminatedManually" colSpan="4"/>
|
||||
</panel>
|
||||
<panel name="durationPanel" if="__config__.app.getApp('contract').isConfigContract" hidden="true" showIf="id && (currentContractVersion.isWithEngagement || currentContractVersion.isWithPriorNotice) && !terminatedManually" colSpan="12">
|
||||
<panel name="engagementPanel" hidden="true" readonly="true" showIf="currentContractVersion.isWithEngagement" colSpan="6">
|
||||
<field name="engagementStartDate" colSpan="6"/>
|
||||
<field name="currentContractVersion.engagementDuration" colSpan="6"/>
|
||||
</panel>
|
||||
<panel hidden="true" readonly="true" showIf="currentContractVersion.isWithPriorNotice" colSpan="3" name="priorNoticeDurationPanel">
|
||||
<field name="currentContractVersion.priorNoticeDuration" colSpan="12"/>
|
||||
</panel>
|
||||
<panel hidden="true" readonly="true" showIf="currentContractVersion.isTacitRenewal" colSpan="3" name="renewalDurationPanel">
|
||||
<field name="currentContractVersion.renewalDuration" colSpan="12"/>
|
||||
</panel>
|
||||
</panel>
|
||||
</panel>
|
||||
<button name="terminatedBtn" title="Terminate" hideIf="terminatedManually || statusSelect == 3" colSpan="3" onClick="save,action-contract-method-terminated"/>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel if="__config__.app.getApp('contract').isConfigContract" title="Config." name="configPanel">
|
||||
<panel name="configSubPanel" title="Invoicing" if="__config__.app.getApp('contract').isInvoicingManagement" colSpan="12">
|
||||
<field name="isInvoicingManagement" onChange="action-contract-attrs-required-payment-config,action-contract-attrs-partner-payment-config" colSpan="12" widget="boolean-switch"/>
|
||||
<panel name="managementPanel" hidden="true" showIf="isInvoicingManagement" colSpan="12">
|
||||
<field name="isAdditionaBenefitManagement" if="__config__.app.getApp('contract')isAdditionalBenefitManagement" widget="boolean-switch" colSpan="12"/>
|
||||
<field name="isConsumptionManagement" if="__config__.app.getApp('contract').isConsumptionManagement" onChange="action-contract-record-update-field-in-version" widget="boolean-switch" colSpan="3"/>
|
||||
<field name="currentContractVersion" if="__config__.app.getApp('contract').isConsumptionManagement" showTitle="false" hidden="true" showIf="isConsumptionManagement" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<field name="isConsumptionBeforeEndDate" colSpan="12" widget="boolean-switch"/>
|
||||
</editor>
|
||||
</field>
|
||||
</panel>
|
||||
|
||||
<panel name="invoicingSubPanel" hidden="true" showIf="isInvoicingManagement" colSpan="12">
|
||||
<field name="currentContractVersion" showTitle="false" colSpan="12" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<panel colSpan="6">
|
||||
<field name="paymentMode" colSpan="6" widget="SuggestBox" canEdit="false" form-view="payment-mode-form" grid-view="payment-mode-grid"/>
|
||||
<field name="paymentCondition" colSpan="6" widget="SuggestBox" canEdit="false" form-view="payment-condition-form" grid-view="payment-condition-grid"/>
|
||||
</panel>
|
||||
<panel colSpan="6">
|
||||
<field name="automaticInvoicing" colSpan="4" widget="boolean-switch"/>
|
||||
<field name="invoicingMomentSelect" hidden="true" showIf="automaticInvoicing" colSpan="4" requiredIf="automaticInvoicing"/>
|
||||
<field name="numberOfDays" showIf="invoicingMomentSelect == 3 || invoicingMomentSelect == 4" colSpan="4"/>
|
||||
</panel>
|
||||
</editor>
|
||||
</field>
|
||||
<field name="currentContractVersion" showTitle="false" colSpan="12" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<field name="isPeriodicInvoicing" colSpan="3" widget="boolean-switch"/>
|
||||
<panel hidden="true" showIf="isPeriodicInvoicing" colSpan="9">
|
||||
<field name="invoicingDuration" colSpan="4" canEdit="false" requiredIf="isPeriodicInvoicing"/>
|
||||
<field name="isTimeProratedInvoice" colSpan="4" widget="boolean-switch"/>
|
||||
<field name="isVersionProratedInvoice" hidden="true" showIf="isTimeProratedInvoice" colSpan="4" widget="boolean-switch"/>
|
||||
</panel>
|
||||
</editor>
|
||||
</field>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel if="__config__.app.getApp('contract').isRenewalManagement" title="Renewal" colSpan="12" name="renewalDetailsPanel">
|
||||
<field name="currentContractVersion" showTitle="false" colSpan="12" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<field name="isTacitRenewal" colSpan="3" widget="boolean-switch"/>
|
||||
<field name="renewalDuration" hidden="true" showIf="isTacitRenewal" colSpan="3" requiredIf="isTacitRenewal"/>
|
||||
<field name="isAutoEnableVersionOnRenew" hidden="true" showIf="isTacitRenewal" colSpan="6" widget="boolean-switch"/>
|
||||
</editor>
|
||||
</field>
|
||||
</panel>
|
||||
<field name="currentContractVersion" showTitle="false" colSpan="12" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<panel title="Engagement" >
|
||||
<field name="isWithEngagement" colSpan="6" widget="boolean-switch"/>
|
||||
<field name="engagementDuration" showIf="isWithEngagement" colSpan="6" canNew="true" requiredIf="isWithEngagement"/>
|
||||
<field name="engagementStartFromVersion" showIf="isWithEngagement" colSpan="12" requiredIf="isWithEngagement" widget="boolean-switch"/>
|
||||
</panel>
|
||||
<panel title="Prior notice" >
|
||||
<field name="isWithPriorNotice" widget="boolean-switch"/>
|
||||
<field name="priorNoticeDuration" showIf="isWithPriorNotice" canNew="true" requiredIf="isWithPriorNotice"/>
|
||||
</panel>
|
||||
</editor>
|
||||
</field>
|
||||
</panel>
|
||||
<panel-related name="versionHistoryPanel" hidden="true" readonly="true" showIf="versionHistory && versionHistory.length > 0" field="versionHistory" form-view="contract-archived-version-form">
|
||||
<field name="createdOn"/>
|
||||
<field name="activationDate"/>
|
||||
<field name="endDate"/>
|
||||
<field name="statusSelect"/>
|
||||
</panel-related>
|
||||
</panel-tabs>
|
||||
<panel-mail name="mailsPanel">
|
||||
<mail-messages limit="4"/>
|
||||
<mail-followers/>
|
||||
</panel-mail>
|
||||
</form>
|
||||
|
||||
<action-attrs name="action-contract-attrs-show-close-btn">
|
||||
<attribute for="closeContractBtn" name="hidden" expr="terminatedDate == null || statusSelect != 2 || __config__.app.getTodayDate() < terminatedDate"/>
|
||||
</action-attrs>
|
||||
|
||||
<action-method name="action-contract-method-close">
|
||||
<call class="com.axelor.apps.contract.web.ContractController" method="close"/>
|
||||
</action-method>
|
||||
|
||||
<action-group name="action-contract-group-on-load">
|
||||
<action name="action-contract-attrs-require-payment-config"/>
|
||||
<action name="action-contract-attrs-readonly-by-config"/>
|
||||
<action name="action-contract-readonly-if-unchangable"/>
|
||||
</action-group>
|
||||
|
||||
<action-attrs name="action-contract-attrs-readonly-by-config">
|
||||
<attribute for="currentContractVersionDescriptionPanel" name="readonly" expr="eval: __config__.app.getApp('contract').isUnchangableContract && statusSelect > 1"/>
|
||||
</action-attrs>
|
||||
|
||||
<action-record name="action-contract-record-default" model="com.axelor.apps.contract.db.Contract">
|
||||
<field name="statusSelect" expr="eval: 1"/>
|
||||
<field name="company" expr="eval: __user__.activeCompany"/>
|
||||
<field name="targetTypeSelect" expr="eval: _xTargetType" if="_xTargetType != null"/>
|
||||
<field name="currentContractVersion" expr="action:action-record-contract-version-default-record"/>
|
||||
<field name="partner" expr="eval: _partner"/>
|
||||
<field name="currency" expr="eval: __user__.activeCompany.currency"/>
|
||||
<field name="project" expr="eval:_project" if="_project != null"/>
|
||||
</action-record>
|
||||
|
||||
<action-record name="action-record-contract-version-default-record" model="com.axelor.apps.contract.db.ContractVersion">
|
||||
<field name="statusSelect" expr="eval: 1"/>
|
||||
</action-record>
|
||||
|
||||
<action-attrs name="action-attrs-contract-partner-domain">
|
||||
<attribute for="partner" name="domain" expr="eval: "self IS NULL AND :company member of self.companySet""/>
|
||||
<attribute for="partner" name="domain" expr="eval: "self.isCustomer IS TRUE AND :company member of self.companySet"" if="targetTypeSelect == 1"/>
|
||||
<attribute for="partner" name="domain" expr="eval: "self.isSupplier IS TRUE AND :company member of self.companySet"" if="targetTypeSelect == 2"/>
|
||||
</action-attrs>
|
||||
|
||||
<action-method name="action-contract-method-copy-from-template">
|
||||
<call class="com.axelor.apps.contract.web.ContractController" method="copyFromTemplate"/>
|
||||
</action-method>
|
||||
|
||||
<action-method name="action-contract-method-delete-next-version">
|
||||
<call class="com.axelor.apps.contract.web.ContractController" method="deleteNextVersion"/>
|
||||
</action-method>
|
||||
|
||||
<action-method name="action-contract-method-waiting">
|
||||
<call class="com.axelor.apps.contract.web.ContractController" method="waiting"/>
|
||||
</action-method>
|
||||
|
||||
<action-method name="action-contract-method-ongoing">
|
||||
<call class="com.axelor.apps.contract.web.ContractController" method="ongoing"/>
|
||||
</action-method>
|
||||
|
||||
<action-method name="action-contract-method-renew">
|
||||
<call class="com.axelor.apps.contract.web.ContractController" method="renew"/>
|
||||
</action-method>
|
||||
|
||||
<form name="contract-archived-version-form" title="Version" model="com.axelor.apps.contract.db.ContractVersion">
|
||||
<panel title="Informations" name="informationsPanel">
|
||||
<field name="statusSelect" colSpan="12" readonly="true" widget="NavSelect" showTitle="false"/>
|
||||
<panel showIf="id" colSpan="12" name="creationDetailsPanel">
|
||||
<field name="createdOn"/>
|
||||
<field name="createdBy"/>
|
||||
</panel>
|
||||
<panel name="activationPanel" showIf="statusSelect >= 3" colSpan="12" readonly="true">
|
||||
<field name="activationDate"/>
|
||||
<field name="activatedByUser"/>
|
||||
</panel>
|
||||
<field name="supposedEndDate"/>
|
||||
<field name="endDate" hidden="true" showIf="endDate" readonly="true"/>
|
||||
<field name="description" widget="html"/>
|
||||
<field name="metaFile" widget="binary-link"/>
|
||||
<field name="contractLineList" showTitle="false" hidden="true"
|
||||
showIf="contractHistory.isInvoicingManagement" colSpan="12"
|
||||
form-view="contract-line-form" grid-view="contract-line-grid"/>
|
||||
<field name="contractHistory.isInvoicingManagement" hidden="true"/>
|
||||
</panel>
|
||||
</form>
|
||||
|
||||
<action-view name="action-view-contract-show-version" title="Version" model="com.axelor.apps.contract.db.ContractVersion">
|
||||
<view type="grid" name="contract-version-next-grid"/>
|
||||
<view type="form" name="contract-version-next-form"/>
|
||||
<context name="_showRecord" expr="eval: nextVersion.id"/>
|
||||
</action-view>
|
||||
|
||||
<action-view name="action-view-contract-add-version" title="Nouvelle version" model="com.axelor.apps.contract.db.ContractVersion">
|
||||
<view type="form" name="contract-version-next-form"/>
|
||||
<view type="grid" name="contract-version-next-grid"/>
|
||||
<view-param name="forceEdit" value="true"/>
|
||||
<context name="_xContractId" expr="eval: id"/>
|
||||
<context name="_xIsNextVersion" expr="true"/>
|
||||
</action-view>
|
||||
|
||||
<action-view name="action.contract.view.contract" model="com.axelor.apps.contract.db.Contract" title="Contract">
|
||||
<view type="form" name="contract-form"/>
|
||||
<view type="grid" name="contract-grid"/>
|
||||
<context name="_showRecord" expr="eval: nextContract.id"/>
|
||||
</action-view>
|
||||
|
||||
<action-view name="action-contract-view-invoicing" model="com.axelor.apps.account.db.Invoice" title="Invoices">
|
||||
<view type="grid" name="invoice-lite-grid" />
|
||||
<view type="form" name="invoice-form" />
|
||||
<domain>self.contract.id = :contractId</domain>
|
||||
<context name="contractId" expr="eval: id"/>
|
||||
</action-view>
|
||||
|
||||
<action-attrs name="action-contract-attrs-domains-template">
|
||||
<attribute for="$contractTemplate" name="domain" expr="eval: "self.targetTypeSelect = ${targetTypeSelect}""/>
|
||||
<attribute for="partner" name="domain" expr="eval: "self.isCustomer = true AND :company member of self.companySet"" if="targetTypeSelect == 1"/>
|
||||
<attribute for="partner" name="domain" expr="eval: "self.isSupplier = true AND :company member of self.companySet"" if="targetTypeSelect == 2"/>
|
||||
</action-attrs>
|
||||
|
||||
<action-method name="action-contract-method-terminated">
|
||||
<call class="com.axelor.apps.contract.web.ContractController" method="terminated"/>
|
||||
</action-method>
|
||||
|
||||
<action-attrs name="action-contract-attrs-required-payment-config">
|
||||
<attribute for="currentContractVersion.paymentMode" name="required" expr="eval: isInvoicingManagement"/>
|
||||
<attribute for="currentContractVersion.paymentCondition" name="required" expr="eval: isInvoicingManagement"/>
|
||||
</action-attrs>
|
||||
|
||||
<action-attrs name="action-contract-attrs-partner-payment-config">
|
||||
<attribute for="currentContractVersion.paymentMode" name="value" expr="eval: partner?.inPaymentMode"/>
|
||||
<attribute for="currentContractVersion.paymentCondition" name="value" expr="eval: partner?.paymentCondition"/>
|
||||
</action-attrs>
|
||||
|
||||
<action-method name="action-method-contract-change-product">
|
||||
<call class="com.axelor.apps.contract.web.ContractController" method="changeProduct"/>
|
||||
</action-method>
|
||||
|
||||
<action-method name="action-contract-method-invoicing">
|
||||
<call class="com.axelor.apps.contract.web.ContractController" method="invoicing"/>
|
||||
</action-method>
|
||||
|
||||
<action-method name="action-contract-method-is-valid">
|
||||
<call class="com.axelor.apps.contract.web.ContractController"
|
||||
method="isValid"/>
|
||||
</action-method>
|
||||
|
||||
<action-validate name="action-contract-validate-on-going">
|
||||
<alert message="Attention the contract will have as starting date the provisional activation
|
||||
date ${currentContractVersion.supposedActivationDate}, Are you sure?"
|
||||
if="currentContractVersion.supposedActivationDate && currentContractVersion.supposedActivationDate < __date__"/>
|
||||
</action-validate>
|
||||
|
||||
<action-attrs name="action-contract-readonly-if-unchangable" model="com.axelor.apps.contract.db.Contract">
|
||||
<attribute for="currentContractVersion.contractLineList,isInvoicingManagement,isAdditionaBenefitManagement,isConsumptionManagement,
|
||||
currentContractVersion.isConsumptionBeforeEndDate,currentContractVersion.paymentMode,currentContractVersion.paymentCondition,
|
||||
currentContractVersion.automaticInvoicing,currentContractVersion.invoicingMomentSelect,currentContractVersion.invoicingDuration,
|
||||
currentContractVersion.isTimeProratedInvoice,currentContractVersion.isVersionProratedInvoice,currentContractVersion.isTacitRenewal,
|
||||
currentContractVersion.renewalDuration,currentContractVersion.isAutoEnableVersionOnRenew,currentContractVersion.isWithEngagement,
|
||||
currentContractVersion.engagementDuration,currentContractVersion.engagementStartFromVersion,currentContractVersion.isWithPriorNotice,
|
||||
currentContractVersion.priorNoticeDuration,currentContractVersion.isPeriodicInvoicing,firstPeriodEndDate,currentContractVersion.numberOfDays"
|
||||
name="readonly" expr="eval: (__config__.app.getApp('contract').isUnchangableContract && currentContractVersion.statusSelect > 2)
|
||||
|| (!__config__.app.getApp('contract').isUnchangableContract && currentContractVersion.statusSelect > 3)"/>
|
||||
<attribute for="currentContractVersion.contractLineList"
|
||||
name="readonly" expr="eval: (__config__.app.getApp('contract').isUnchangableContract && currentContractVersion.statusSelect > 2)
|
||||
|| (!__config__.app.getApp('contract').isUnchangableContract && currentContractVersion.statusSelect > 3)
|
||||
|| !id"/>
|
||||
</action-attrs>
|
||||
|
||||
<action-attrs name="action-contract-attrs-domains-partner">
|
||||
<attribute name="domain" for="partner" expr="eval: " :company member of self.companySet AND (self.isProspect = true OR self.isCustomer = true) "" if="_xTargetType == 1"/>
|
||||
<attribute name="domain" for="partner" expr="eval: " :company member of self.companySet AND self.isSupplier = true "" if="_xTargetType == 2"/>
|
||||
</action-attrs>
|
||||
|
||||
</object-views>
|
||||
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<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">
|
||||
|
||||
<grid name="contract-batch-grid" title="Contract batches" model="com.axelor.apps.contract.db.ContractBatch">
|
||||
<field name="code"/>
|
||||
<field name="actionSelect"/>
|
||||
<field name="company" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
|
||||
<field name="description"/>
|
||||
</grid>
|
||||
|
||||
<form name="contract-batch-form" title="Contract batch" model="com.axelor.apps.contract.db.ContractBatch">
|
||||
<panel name="mainPanel" >
|
||||
<field name="actionSelect"/>
|
||||
<field name="code"/>
|
||||
<field name="company" canEdit="false" widget="SuggestBox" form-view="company-form" grid-view="company-grid"/>
|
||||
</panel>
|
||||
<panel-tabs name="mainPanelTab">
|
||||
<panel name="informationPanel" title="Information" >
|
||||
<field name="createdOn" title="Created on"/>
|
||||
<field name="createdBy" title="Created by" form-view="user-form" grid-view="user-grid"/>
|
||||
<field name="description" colSpan="12" />
|
||||
<panel-related name="batchListPanel" field="batchList" colSpan="12" form-view="batch-form" grid-view="batch-grid" readonly="true"/>
|
||||
</panel>
|
||||
</panel-tabs>
|
||||
<panel name="actionsPanel" sidebar="true" title="Actions">
|
||||
<button name="batchBtn" title="Run batch" onClick="save,action-contract-method-run-batch" colSpan="12"/>
|
||||
</panel>
|
||||
</form>
|
||||
|
||||
<action-method name="action-contract-method-run-batch">
|
||||
<call class="com.axelor.apps.contract.web.ContractBatchController" method="runBatch"/>
|
||||
</action-method>
|
||||
|
||||
</object-views>
|
||||
@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<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">
|
||||
|
||||
<grid name="contract-line-grid" title="Contract Lines"
|
||||
model="com.axelor.apps.contract.db.ContractLine" canMove="true"
|
||||
orderBy="sequence">
|
||||
<hilite if="isConsumptionLine" background="primary"/>
|
||||
<field name="productName"/>
|
||||
<field name="qty"/>
|
||||
<field name="price"/>
|
||||
<field name="exTaxTotal"/>
|
||||
<field name="inTaxTotal"/>
|
||||
<field name="isConsumptionLine" hidden="true"/>
|
||||
</grid>
|
||||
|
||||
<form name="contract-line-form" title="Contract line" model="com.axelor.apps.contract.db.ContractLine"
|
||||
onNew="action-contract-line-attrs-hide-consumption-line"
|
||||
onLoad="action-contract-line-attrs-hide-consumption-line">
|
||||
|
||||
<panel-tabs name="mainPanelTab">
|
||||
<panel name="informationsPanel" title="Information">
|
||||
<field name="product" canEdit="false" onChange="action-method-contract-version-change-product,action-method-contract-line-compute-total"/>
|
||||
<field name="productName"/>
|
||||
<field name="qty" readonlyIf="isConsumptionLine" onChange="action-method-contract-line-compute-total"/>
|
||||
<field name="price" onChange="action-method-contract-line-compute-total"/>
|
||||
<field name="taxLine" canEdit="false" onChange="action-method-contract-line-compute-total"/>
|
||||
<field name="unit" canEdit="false"/>
|
||||
<field name="exTaxTotal" readonly="true"/>
|
||||
<field name="inTaxTotal" readonly="true"/>
|
||||
<field name="isConsumptionLine" hidden="true" onChange="action-method-contract-line-change-is-consumption-line,action-method-contract-line-compute-total"/>
|
||||
<field name="isInvoiced" readonly="true" showIf="isInvoiced" />
|
||||
<field name="description" colSpan="12" widget="html"/>
|
||||
<field name="contractVersion" hidden="true"/>
|
||||
</panel>
|
||||
<panel name="analyticDistributionPanel" title="Analytics" if="__config__.app.getApp('account').getManageAnalyticAccounting()"
|
||||
onTabSelect="action-contract-line-attrs-read-only-distribution-lines">
|
||||
<field name="analyticDistributionTemplate" grid-view="analytic-distribution-template-grid" form-view="analytic-distribution-template-form" canEdit="false"
|
||||
onChange="action-contract-line-method-create-distribution"/>
|
||||
<panel-related name="analyticMoveLineListPanel" field="analyticMoveLineList" grid-view="analytic-move-line-distribution-grid" form-view="analytic-move-line-distribution-form" colSpan="12"/>
|
||||
</panel>
|
||||
</panel-tabs>
|
||||
</form>
|
||||
|
||||
<action-attrs name="action-contract-line-attrs-hide-consumption-line" model="com.axelor.apps.contract.db.ContractLine">
|
||||
<attribute name="hidden" for="isConsumptionLine" expr="eval: !__parent__?.isConsumptionManagement"/>
|
||||
</action-attrs>
|
||||
|
||||
<action-attrs name="action-contract-line-attrs-set-analytic-distribution-template-domain">
|
||||
<attribute name="domain" for="analyticDistributionTemplate" expr="eval: " self.company.id = ${_parent?.company.id} ""/>
|
||||
</action-attrs>
|
||||
|
||||
<action-attrs name="action-contract-line-attrs-read-only-distribution-lines">
|
||||
<attribute name="readonly" for="analyticMoveLineList" expr="eval: !__config__.app.isApp('account') || __config__.app.getApp('account').getAnalyticDistributionTypeSelect() != 1"/>
|
||||
</action-attrs>
|
||||
|
||||
<action-method name="action-contract-line-method-create-distribution">
|
||||
<call class="com.axelor.apps.contract.web.ContractLineController" method="createAnalyticDistributionWithTemplate"/>
|
||||
</action-method>
|
||||
|
||||
<action-record name="action-method-contract-line-change-is-consumption-line"
|
||||
model="com.axelor.apps.contract.db.ContractLine">
|
||||
<field name="qty" expr="eval: 0"/>
|
||||
</action-record>
|
||||
|
||||
<action-method name="action-method-contract-line-compute-total">
|
||||
<call class="com.axelor.apps.contract.web.ContractLineController"
|
||||
method="computeTotal"/>
|
||||
</action-method>
|
||||
|
||||
<grid name="additional-contract-line-grid" title="Additional benefit lines"
|
||||
model="com.axelor.apps.contract.db.ContractLine">
|
||||
<hilite if="isInvoiced" background="success"/>
|
||||
<field name="productName"/>
|
||||
<field name="qty"/>
|
||||
<field name="price"/>
|
||||
<field name="exTaxTotal"/>
|
||||
<field name="inTaxTotal"/>
|
||||
<field name="isInvoiced" hidden="true"/>
|
||||
</grid>
|
||||
|
||||
<form name="additional-contract-line-form" title="Additional benefit"
|
||||
model="com.axelor.apps.contract.db.ContractLine"
|
||||
readonlyIf="isInvoiced">
|
||||
|
||||
<panel-tabs name="mainPanelTab">
|
||||
<panel name="informationsPanel" title="Information">
|
||||
<field name="product" canEdit="false" onChange="action-method-contract-change-product,action-method-contract-line-compute-total"/>
|
||||
<field name="productName"/>
|
||||
<field name="qty" readonlyIf="isConsumptionLine" onChange="action-method-contract-line-compute-total"/>
|
||||
<field name="price" onChange="action-method-contract-line-compute-total"/>
|
||||
<field name="taxLine" canEdit="false" onChange="action-method-contract-line-compute-total"/>
|
||||
<field name="unit" canEdit="false"/>
|
||||
<field name="exTaxTotal" readonly="true"/>
|
||||
<field name="inTaxTotal" readonly="true"/>
|
||||
<field name="isInvoiced" readonly="true" showIf="isInvoiced" />
|
||||
<field name="description" colSpan="12" widget="html"/>
|
||||
</panel>
|
||||
<panel name="analyticDistributionPanel" title="Analytics" if="__config__.app.getApp('account').getManageAnalyticAccounting()"
|
||||
onTabSelect="action-contract-line-attrs-read-only-distribution-lines">
|
||||
<field name="analyticDistributionTemplate" grid-view="analytic-distribution-template-grid" form-view="analytic-distribution-template-form" canEdit="false"
|
||||
onSelect="action-contract-line-attrs-set-analytic-distribution-template-domain"
|
||||
onChange="action-contract-line-method-create-distribution"/>
|
||||
<panel-related name="analyticMoveLineListPanel" field="analyticMoveLineList" colSpan="12" grid-view="analytic-move-line-distribution-grid"
|
||||
form-view="analytic-move-line-distribution-form"/>
|
||||
</panel>
|
||||
</panel-tabs>
|
||||
</form>
|
||||
|
||||
<grid name="contract-line-grid-for-template" title="Contract Lines"
|
||||
model="com.axelor.apps.contract.db.ContractLine">
|
||||
<hilite if="isConsumptionLine" background="primary"/>
|
||||
<field name="productName"/>
|
||||
<field name="qty"/>
|
||||
<field name="price"/>
|
||||
<field name="isConsumptionLine" hidden="true"/>
|
||||
</grid>
|
||||
|
||||
<form name="contract-line-form-for-template" title="Contract Line"
|
||||
model="com.axelor.apps.contract.db.ContractLine">
|
||||
<panel name="mainPanel">
|
||||
<field name="product" canEdit="false"
|
||||
onChange="action-contract-template-method-change-product"/>
|
||||
<field name="productName"/>
|
||||
<field name="qty" readonlyIf="isConsumptionLine"/>
|
||||
<field name="price"/>
|
||||
<field name="taxLine" canEdit="false"/>
|
||||
<field name="unit" canEdit="false"/>
|
||||
<field name="isConsumptionLine"
|
||||
onChange="action-method-contract-line-change-is-consumption-line"/>
|
||||
<field name="description" colSpan="12" widget="html"/>
|
||||
</panel>
|
||||
</form>
|
||||
|
||||
<grid name="additional-contract-line-grid-for-template" title="Additional benefit lines"
|
||||
model="com.axelor.apps.contract.db.ContractLine">
|
||||
<field name="productName"/>
|
||||
<field name="qty"/>
|
||||
<field name="price"/>
|
||||
</grid>
|
||||
|
||||
<form name="additional-contract-line-form-for-template" title="Additional benefit"
|
||||
model="com.axelor.apps.contract.db.ContractLine">
|
||||
<panel name="mainPanel">
|
||||
<field name="product" canEdit="false"
|
||||
onChange="action-contract-template-method-change-product"/>
|
||||
<field name="productName"/>
|
||||
<field name="qty"/>
|
||||
<field name="price"/>
|
||||
<field name="taxLine" canEdit="false"/>
|
||||
<field name="unit" canEdit="false"/>
|
||||
<field name="description" colSpan="12" widget="html"/>
|
||||
</panel>
|
||||
</form>
|
||||
|
||||
</object-views>
|
||||
@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<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">
|
||||
|
||||
<grid name="contract-template-grid" title="Contract templates" model="com.axelor.apps.contract.db.ContractTemplate">
|
||||
<field name="name"/>
|
||||
<field name="targetTypeSelect"/>
|
||||
<field name="company" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
|
||||
</grid>
|
||||
|
||||
<form name="contract-template-form" title="Contract template" model="com.axelor.apps.contract.db.ContractTemplate" width="large" onNew="action-contract-template-record-default-record-onnew" readonlyIf="statusSelect == 3">
|
||||
<panel name="mainPanel">
|
||||
<panel colSpan="9" name="subMainPanel">
|
||||
<field name="targetTypeSelect" readonlyIf="id" onChange="action-contract-attrs-domains-template"/>
|
||||
<field name="company" readonlyIf="statusSelect >= 2" canEdit="false"/>
|
||||
<field name="name" colSpan="12" css="highlight"/>
|
||||
<field if="__config__.app.getApp('contract').getIsInvoicingManagement()" colSpan="4" name="currency"/>
|
||||
</panel>
|
||||
<panel colSpan="3" stacked="true" name="notePanel">
|
||||
<panel title="Notes" stacked="true" name="subNotePanel">
|
||||
<field name="note" showTitle="false"/>
|
||||
</panel>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel-tabs name="mainPanelTab">
|
||||
<panel title="Content" name="contentPanel">
|
||||
<field name="contractLineList" hidden="true" showIf="isInvoicingManagement"
|
||||
colSpan="12" form-view="contract-line-form-for-template"
|
||||
grid-view="contract-line-grid-for-template"/>
|
||||
<field name="additionalBenefitContractLineList"
|
||||
showIf="isInvoicingManagement && isAdditionaBenefitManagement"
|
||||
readonlyIf="!id" colSpan="12" form-view="additional-contract-line-form-for-template"
|
||||
grid-view="additional-contract-line-grid-for-template"/>
|
||||
<field name="description" colSpan="12" widget="html"/>
|
||||
</panel>
|
||||
<panel if="__config__.app.getApp('contract').isConfigContract" title="Config." name="configPanel">
|
||||
<panel if="__config__.app.getApp('contract').isInvoicingManagement" title="Invoicing" readonlyIf="statusSelect > 1" colSpan="12" name="subConfigPanel">
|
||||
<field name="isInvoicingManagement" colSpan="6" widget="boolean-switch" onChange="action-contract-attrs-required-payment-config,action-contract-attrs-partner-payment-config"/>
|
||||
<panel name="managementPanel" hidden="true" showIf="isInvoicingManagement" colSpan="6">
|
||||
<field if="__config__.app.getApp('contract')isAdditionalBenefitManagement" name="isAdditionaBenefitManagement" colSpan="6" widget="boolean-switch"/>
|
||||
<field if="__config__.app.getApp('contract').isConsumptionManagement" name="isConsumptionManagement" colSpan="6" widget="boolean-switch"/>
|
||||
</panel>
|
||||
<field if="__config__.app.getApp('contract').isConsumptionManagement" name="currentContractVersion" showTitle="false" hidden="true" showIf="isConsumptionManagement" colSpan="6" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<field name="isConsumptionBeforeEndDate" colSpan="12" widget="boolean-switch"/>
|
||||
</editor>
|
||||
</field>
|
||||
<panel name="subInvoicingPanel" hidden="true" showIf="isInvoicingManagement" colSpan="12">
|
||||
<field name="currentContractVersion" showTitle="false" readonlyIf="currentContractVersion.statusSelect > 2" colSpan="12" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<panel colSpan="6" name="paymentPanel">
|
||||
<field name="paymentMode" colSpan="6" widget="SuggestBox" canEdit="false" form-view="payment-mode-form" grid-view="payment-mode-grid"/>
|
||||
<field name="paymentCondition" colSpan="6" widget="SuggestBox" canEdit="false" form-view="payment-condition-form" grid-view="payment-condition-grid"/>
|
||||
</panel>
|
||||
<panel colSpan="6" name="automaticInvoicingPanel">
|
||||
<field name="automaticInvoicing" readonlyIf="statusSelect > 2" colSpan="6" widget="boolean-switch"/>
|
||||
<field name="invoicingMomentSelect" hidden="true" showIf="automaticInvoicing" colSpan="6" requiredIf="automaticInvoicing"/>
|
||||
</panel>
|
||||
</editor>
|
||||
</field>
|
||||
<field name="currentContractVersion" showTitle="false" readonlyIf="currentContractVersion.statusSelect > 2" colSpan="12" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<field name="isPeriodicInvoicing" readonlyIf="statusSelect > 2" colSpan="3" widget="boolean-switch"/>
|
||||
<panel name="invoicingDetailsPanel" hidden="true" showIf="isPeriodicInvoicing" colSpan="9">
|
||||
<field name="invoicingDuration" colSpan="4" canEdit="false" requiredIf="isPeriodicInvoicing"/>
|
||||
<field name="isTimeProratedInvoice" colSpan="4" widget="boolean-switch"/>
|
||||
<field name="isVersionProratedInvoice" hidden="true" showIf="isTimeProratedInvoice" colSpan="4" widget="boolean-switch"/>
|
||||
</panel>
|
||||
</editor>
|
||||
</field>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel if="__config__.app.getApp('contract').isRenewalManagement" title="Renewal" colSpan="12" name="renewalDetailsPanel">
|
||||
<field name="currentContractVersion" showTitle="false" readonlyIf="currentContractVersion.statusSelect > 2" colSpan="12" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<field name="isTacitRenewal" colSpan="3" widget="boolean-switch"/>
|
||||
<field name="renewalDuration" hidden="true" showIf="isTacitRenewal" colSpan="3" requiredIf="isTacitRenewal"/>
|
||||
<field name="isAutoEnableVersionOnRenew" hidden="true" showIf="isTacitRenewal" colSpan="6" widget="boolean-switch"/>
|
||||
</editor>
|
||||
</field>
|
||||
</panel>
|
||||
<field name="currentContractVersion" showTitle="false" readonlyIf="currentContractVersion.statusSelect > 2" colSpan="12" x-show-icons="false">
|
||||
<editor x-viewer="true" x-show-on-new="true" x-show-titles="true">
|
||||
<panel title="Engagement" name="engagementPanel">
|
||||
<field name="isWithEngagement" colSpan="6" widget="boolean-switch"/>
|
||||
<field name="engagementDuration" showIf="isWithEngagement" colSpan="6" canNew="true" requiredIf="isWithEngagement"/>
|
||||
<field name="engagementStartFromVersion" showIf="isWithEngagement" colSpan="12" requiredIf="isWithEngagement"/>
|
||||
</panel>
|
||||
<panel title="Prior notice" name="priorNoticePanel">
|
||||
<field name="isWithPriorNotice" widget="boolean-switch"/>
|
||||
<field name="priorNoticeDuration" showIf="isWithPriorNotice" canNew="true" requiredIf="isWithPriorNotice"/>
|
||||
</panel>
|
||||
</editor>
|
||||
</field>
|
||||
</panel>
|
||||
</panel-tabs>
|
||||
<panel-mail name="mailPanel">
|
||||
<mail-messages limit="4"/>
|
||||
<mail-followers/>
|
||||
</panel-mail>
|
||||
</form>
|
||||
|
||||
<action-record name="action-contract-template-record-default-record-onnew" model="com.axelor.apps.contract.db.Contract">
|
||||
<field name="company" expr="eval: __user__.activeCompany"/>
|
||||
</action-record>
|
||||
|
||||
<action-method name="action-contract-template-method-change-product">
|
||||
<call class="com.axelor.apps.contract.web.ContractTemplateController" method="changeProduct"/>
|
||||
</action-method>
|
||||
|
||||
</object-views>
|
||||
@ -0,0 +1,164 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<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">
|
||||
|
||||
<grid name="contract-version-next-grid" title="Versions" model="com.axelor.apps.contract.db.ContractVersion">
|
||||
<field name="contract.contractId"/>
|
||||
<field name="contract.name"/>
|
||||
<field name="contract.partner"/>
|
||||
<field name="activationDate"/>
|
||||
<field name="statusSelect"/>
|
||||
</grid>
|
||||
|
||||
<form name="contract-version-next-form" title="Version" model="com.axelor.apps.contract.db.ContractVersion" width="large" onLoad="action-contract-version-attrs-load" onSave="save,action-contract-version-method-save" onNew="action-contract-version-method-new-draft,action-contract-version-attrs-load">
|
||||
<panel name="mainPanel">
|
||||
<panel name="generalInfoPanel" colSpan="9">
|
||||
<panel name="hiddenFieldsPanel" hidden="true" colSpan="12">
|
||||
<field name="nextContract.contractId"/>
|
||||
<field name="nextContract.statusSelect"/>
|
||||
<field name="nextContract.targetTypeSelect"/>
|
||||
</panel>
|
||||
<field name="statusSelect" showTitle="false" readonly="true" colSpan="6" widget="NavSelect"/>
|
||||
<field name="$viewerTags" showTitle="false" readonly="true" colSpan="6">
|
||||
<viewer depends="nextContract.targetTypeSelect,nextContract.statusSelect,nextContract.contractId"><![CDATA[
|
||||
<h3 class="text-right">
|
||||
<span style="margin-right: 10px;"><span x-translate>Version</span><span ng-show="record.nextContract.contractId"> - {{ record.nextContract.contractId }}</span></span>
|
||||
|
||||
<span class="label label-info" x-translate ng-show="record.nextContract.targetTypeSelect == 1">Customer</span>
|
||||
<span class="label label-warning" x-translate ng-show="record.nextContract.targetTypeSelect == 2">Supplier</span>
|
||||
|
||||
<span class="label label-default" x-translate ng-show="record.nextContract.statusSelect == 1">Draft</span>
|
||||
<span class="label label-info" x-translate ng-show="record.nextContract.statusSelect == 2">Active</span>
|
||||
<span class="label label-important" x-translate ng-show="record.nextContract.statusSelect == 3">Closed</span>
|
||||
</h3>
|
||||
]]></viewer>
|
||||
</field>
|
||||
<field name="nextContract.company" colSpan="4"/>
|
||||
<field name="nextContract.partner" colSpan="4"/>
|
||||
<field if="__config__.app.getApp('contract').isInvoicingManagement" name="nextContract.currency" colSpan="4"/>
|
||||
<field name="nextContract.name" css="highlight" colSpan="12"/>
|
||||
<panel name="contractDatesPanel" title="Contract Dates" hidden="true" showIf="id" colSpan="12">
|
||||
<field name="nextContract.createdOn" colSpan="3"/>
|
||||
<field name="nextContract.createdBy" colSpan="3"/>
|
||||
<field name="nextContract.startDate" readonly="true" showIf="nextContract.statusSelect >= 2" colSpan="3"/>
|
||||
<field name="nextContract.endDate" hidden="true" showIf="nextContract.statusSelect == 3" colSpan="3"/>
|
||||
</panel>
|
||||
<panel name="currentVersionPanel" title="Current version" colSpan="12">
|
||||
<panel colSpan="6" name="datesPanel">
|
||||
<panel name="supposedDatesPanel" hideIf="statusSelect >= 3" colSpan="12">
|
||||
<field name="supposedActivationDate"/>
|
||||
<field name="supposedEndDate"/>
|
||||
</panel>
|
||||
<panel name="activationDatesPanel" hidden="true" readonly="true" showIf="statusSelect >= 3" colSpan="12">
|
||||
<field name="activatedByUser" colSpan="4"/>
|
||||
<field name="activationDate" colSpan="4"/>
|
||||
<panel colSpan="4" name="endDatesPanel">
|
||||
<field name="supposedEndDate" hidden="true" readonly="true" showIf="statusSelect == 3" colSpan="12"/>
|
||||
<field name="endDate" hidden="true" readonly="true" showIf="statusSelect == 4" colSpan="12"/>
|
||||
</panel>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel name="creationDetailsPanel" showIf="id" colSpan="6">
|
||||
<field name="createdOn"/>
|
||||
<field name="createdBy"/>
|
||||
</panel>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel colSpan="3" stacked="true" name="actionsPanel">
|
||||
<panel name="subActionsPanel" stacked="true">
|
||||
<button name="cancelBtn" title="Cancel" hidden="true" showIf="!id" onClick="action.contract.view.contract,close"/>
|
||||
<button name="showBtn" title="Show contract" showIf="id" onClick="action.contract.view.contract,close"/>
|
||||
<button name="waitingBtn" title="Waiting" showIf="id && statusSelect == 1" onClick="save,action-contract-version-method-waiting"/>
|
||||
<button name="ongoingBtn" title="Ongoing" showIf="id && statusSelect == 2" onClick="save,action-contract-version-method-active,close"/>
|
||||
</panel>
|
||||
<panel title="Notes" stacked="true" name="notePanel">
|
||||
<field name="nextContract.note" showTitle="false"/>
|
||||
</panel>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel-tabs name="mainPanelTab">
|
||||
<panel title="Content" name="contentPanel">
|
||||
<field if="__config__.app.getApp('contract').isInvoicingManagement" hidden="true"
|
||||
showIf="nextContract.isInvoicingManagement" name="contractLineList"
|
||||
colSpan="12"/>
|
||||
<field name="description" colSpan="9" widget="html"/>
|
||||
<field name="metaFile" colSpan="3" widget="binary-link"/>
|
||||
</panel>
|
||||
<panel if="__config__.app.getApp('contract').isConfigContract" title="Config." name="configPanel">
|
||||
<panel if="__config__.app.getApp('contract').isInvoicingManagement" title="Invoicing" colSpan="12" name="configSubPanel">
|
||||
<field name="nextContract.isInvoicingManagement" colSpan="6" widget="boolean-switch"/>
|
||||
<panel name="managementPanel" hidden="true" showIf="nextContract.isInvoicingManagement" colSpan="6">
|
||||
<field if="__config__.app.getApp('contract')isAdditionalBenefitManagement" widget="boolean-switch" name="nextContract.isAdditionaBenefitManagement" colSpan="6"/>
|
||||
<field if="__config__.app.getApp('contract').isConsumptionManagement" widget="boolean-switch" name="nextContract.isConsumptionManagement" colSpan="6"/>
|
||||
</panel>
|
||||
<field if="__config__.app.getApp('contract').isConsumptionManagement" widget="boolean-switch" name="isConsumptionBeforeEndDate" hidden="true" showIf="nextContract.isConsumptionManagement" colSpan="6"/>
|
||||
<panel name="invoicingSubPanel" hidden="true" showIf="nextContract.isInvoicingManagement" colSpan="12">
|
||||
<panel name="paymentPanel" colSpan="12">
|
||||
<field name="paymentMode" colSpan="3" widget="SuggestBox" canEdit="false" form-view="payment-mode-form" grid-view="payment-mode-grid"/>
|
||||
<field name="paymentCondition" colSpan="3" widget="SuggestBox" canEdit="false" form-view="payment-condition-form" grid-view="payment-condition-grid"/>
|
||||
<field name="automaticInvoicing" colSpan="3" widget="boolean-switch"/>
|
||||
<field name="invoicingMomentSelect" showIf="automaticInvoicing" colSpan="3"/>
|
||||
</panel>
|
||||
<panel name="invoicingDetailsPanel" colSpan="12">
|
||||
<field name="isPeriodicInvoicing" colSpan="3" widget="boolean-switch"/>
|
||||
<panel showIf="isPeriodicInvoicing" colSpan="9" name="subInvoicingDetailsPanel">
|
||||
<field name="invoicingDuration" colSpan="4"/>
|
||||
<field name="isTimeProratedInvoice" colSpan="4" widget="boolean-switch"/>
|
||||
<field name="isVersionProratedInvoice" hidden="true" showIf="isTimeProratedInvoice" widget="boolean-switch" colSpan="4"/>
|
||||
</panel>
|
||||
</panel>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel if="__config__.app.getApp('contract').isRenewalManagement" title="Renewal" colSpan="12" name="renewalDetailsPanel">
|
||||
<field name="isTacitRenewal" colSpan="3" widget="boolean-switch"/>
|
||||
<field name="renewalDuration" colSpan="3" requiredIf="isTacitRenewal"/>
|
||||
<field name="isAutoEnableVersionOnRenew" colSpan="6" hidden="true" showIf="isTacitRenewal" widget="boolean-switch"/>
|
||||
</panel>
|
||||
<panel title="Engagement" colSpan="6" name="engagementPanel">
|
||||
<field name="isWithEngagement" colSpan="6" widget="boolean-switch"/>
|
||||
<field name="engagementDuration" showIf="isWithEngagement" colSpan="6" canNew="true" requiredIf="isWithEngagement"/>
|
||||
<field name="engagementStartFromVersion" showIf="isWithEngagement" colSpan="12" requiredIf="isWithEngagement" widget="boolean-switch"/>
|
||||
</panel>
|
||||
<panel title="Prior notice" colSpan="6" name="priorNoticePanel">
|
||||
<field name="isWithPriorNotice" widget="boolean-switch"/>
|
||||
<field name="priorNoticeDuration" showIf="isWithPriorNotice" canNew="true" requiredIf="isWithPriorNotice"/>
|
||||
</panel>
|
||||
</panel>
|
||||
</panel-tabs>
|
||||
<panel hidden="true" name="nextContractPanel">
|
||||
<field name="nextContract"/>
|
||||
<field name="$_xIsNext" type="Boolean"/>
|
||||
</panel>
|
||||
<panel-mail name="mailPanel">
|
||||
<mail-messages limit="4"/>
|
||||
<mail-followers/>
|
||||
</panel-mail>
|
||||
</form>
|
||||
|
||||
<action-attrs name="action-contract-version-attrs-load">
|
||||
<attribute for="$_xIsNext" name="value" expr="eval: nextContract"/>
|
||||
<attribute for="$_xIsNext" name="value" expr="eval: _xIsNextVersion" if="_xIsNextVersion"/>
|
||||
</action-attrs>
|
||||
|
||||
<action-method name="action-contract-version-method-new-draft">
|
||||
<call class="com.axelor.apps.contract.web.ContractVersionController" method="newDraft"/>
|
||||
</action-method>
|
||||
|
||||
<action-method name="action-contract-version-method-save">
|
||||
<call class="com.axelor.apps.contract.web.ContractVersionController" method="save"/>
|
||||
</action-method>
|
||||
|
||||
<action-method name="action-contract-version-method-active">
|
||||
<call class="com.axelor.apps.contract.web.ContractVersionController" method="active"/>
|
||||
</action-method>
|
||||
|
||||
<action-method name="action-contract-version-method-waiting">
|
||||
<call class="com.axelor.apps.contract.web.ContractVersionController" method="waiting"/>
|
||||
</action-method>
|
||||
|
||||
<action-method name="action-method-contract-version-change-product">
|
||||
<call class="com.axelor.apps.contract.web.ContractVersionController" method="changeProduct"/>
|
||||
</action-method>
|
||||
|
||||
</object-views>
|
||||
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<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">
|
||||
|
||||
<grid name="invoice-period-grid" title="Invoice periods" model="com.axelor.apps.contract.db.InvoicePeriod">
|
||||
<field name="startDate"/>
|
||||
<field name="endDate"/>
|
||||
<field name="isLastPeriod"/>
|
||||
<field name="statusSelect"/>
|
||||
</grid>
|
||||
|
||||
<form name="invoice-period-form" title="Invoice period" model="com.axelor.apps.contract.db.InvoicePeriod">
|
||||
<panel name="mainPanel" readonlyIf="statusSelect == 2">
|
||||
<field name="startDate" colSpan="4"/>
|
||||
<field name="endDate" colSpan="4"/>
|
||||
<field name="isLastPeriod" colSpan="4"/>
|
||||
<panel name="invoiceDetailsPanel" showIf="statusSelect == 2">
|
||||
<field name="statusSelect"/>
|
||||
<field name="invoice"/>
|
||||
</panel>
|
||||
</panel>
|
||||
<panel-related name="consumptionLineListPanel" field="consumptionLineList" readonlyIf="statusSelect == 2"/>
|
||||
<panel-related name="additionalBenefitListPanel" field="additionalBenefitList" readonlyIf="statusSelect == 2"/>
|
||||
</form>
|
||||
|
||||
</object-views>
|
||||
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<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">
|
||||
|
||||
<menuitem title="Contracts" name="contracts-root" order="-104" if="__config__.app.isApp('contract')" icon="fa-briefcase" icon-background="blue"/>
|
||||
|
||||
<menuitem title="Customer contracts" name="contracts-root-customer-all" action="contracts.root.customer.all" parent="contracts-root"/>
|
||||
|
||||
<action-view name="contracts.root.customer.all" title="Customer contracts" model="com.axelor.apps.contract.db.Contract">
|
||||
<view type="grid" name="contract-grid"/>
|
||||
<view type="form" name="contract-form"/>
|
||||
<domain>self.targetTypeSelect = 1 AND self.statusSelect != 3</domain>
|
||||
<context name="_xTargetType" expr="eval: 1"/>
|
||||
</action-view>
|
||||
|
||||
<menuitem title="Supplier contracts" name="contracts-root-supplier-all" action="contracts.root.supplier.all" parent="contracts-root"/>
|
||||
|
||||
<action-view name="contracts.root.supplier.all" title="Supplier contracts" model="com.axelor.apps.contract.db.Contract">
|
||||
<view type="grid" name="contract-grid"/>
|
||||
<view type="form" name="contract-form"/>
|
||||
<domain>self.targetTypeSelect = 2 AND self.statusSelect != 3</domain>
|
||||
<context name="_xTargetType" expr="eval: 2"/>
|
||||
</action-view>
|
||||
|
||||
<menuitem title="Configuration" name="contracts-root-conf-all" parent="contracts-root" icon="fa-cog"/>
|
||||
|
||||
<menuitem title="Terminated contracts" name="contracts-root-conf-terminated" action="contracts.root.conf.terminated" parent="contracts-root-conf-all"/>
|
||||
|
||||
<action-view name="contracts.root.conf.terminated" title="Terminated contracts" model="com.axelor.apps.contract.db.Contract">
|
||||
<view type="grid" name="contract-grid"/>
|
||||
<view type="form" name="contract-form"/>
|
||||
<domain>self.statusSelect = 3</domain>
|
||||
</action-view>
|
||||
|
||||
<menuitem name="contract-template-all" title="Contract templates" parent="contracts-root-conf-all" action="contract.templates.all"/>
|
||||
|
||||
<action-view name="contract.templates.all" title="Contract templates" model="com.axelor.apps.contract.db.ContractTemplate">
|
||||
<view type="grid" name="contract-template-grid"/>
|
||||
<view type="form" name="contract-template-form"/>
|
||||
</action-view>
|
||||
|
||||
<menuitem name="duration-all" title="Durations" parent="contracts-root-conf-all" action="duration.all" />
|
||||
|
||||
<action-view name="duration.all" title="Duration" model="com.axelor.apps.base.db.Duration">
|
||||
<view type="grid" name="duration-grid"/>
|
||||
<view type="form" name="duration-form"/>
|
||||
</action-view>
|
||||
|
||||
<menuitem name="admin-root-batch-contract" parent="admin-root-batch"
|
||||
title="Contract batches" action="admin.root.batch.contract" />
|
||||
|
||||
<action-view name="admin.root.batch.contract" title="Contract batches"
|
||||
model="com.axelor.apps.contract.db.ContractBatch" >
|
||||
<view type="grid" name="contract-batch-grid"/>
|
||||
<view type="form" name="contract-batch-form"/>
|
||||
</action-view>
|
||||
|
||||
</object-views>
|
||||
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<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">
|
||||
|
||||
<action-view name="action-contract-purchase-order-dashlet" title="Purchase orders" model="com.axelor.apps.purchase.db.PurchaseOrder">
|
||||
<view type="grid" name="purchase-order-grid"/>
|
||||
<view type="form" name="purchase-order-form"/>
|
||||
<domain>self.contract.id = :_contractId</domain>
|
||||
<context name="_contractId" expr="eval:id"/>
|
||||
</action-view>
|
||||
|
||||
<action-view name="action-contract-create-po" title="Create PO" model="com.axelor.apps.purchase.db.PurchaseOrder">
|
||||
<view type="form" name="purchase-order-form"/>
|
||||
<view type="grid" name="purchase-order-grid"/>
|
||||
<domain>self.contract.id = :_contractId</domain>
|
||||
<context name="_contractId" expr="eval:id"/>
|
||||
<context name="_supplier" expr="eval:partner"/>
|
||||
<context name="_paymentMode" expr="eval:paymentMode"/>
|
||||
<context name="_paymentCondition" expr="eval:paymentCondition"/>
|
||||
</action-view>
|
||||
|
||||
<action-record name="action-contract-purchase-order-record-new" model="com.axelor.apps.purchase.db.PurchaseOrder">
|
||||
<field name="supplierPartner" expr="eval:_supplier" if="_supplier != null"/>
|
||||
<field name="contract" expr="eval: __repo__(Contract).find(_contractId)" if="_contractId != null"/>
|
||||
<field name="paymentMode" expr="eval: _paymentMode"/>
|
||||
<field name="paymentCondition" expr="eval: _paymentCondition"/>
|
||||
</action-record>
|
||||
|
||||
</object-views>
|
||||
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<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">
|
||||
|
||||
<selection name="contract.status.select">
|
||||
<option value="1">Draft</option>
|
||||
<option value="2">Active</option>
|
||||
<option value="3">Closed</option>
|
||||
</selection>
|
||||
|
||||
<selection name="contract.version.status.select">
|
||||
<option value="1">Draft</option>
|
||||
<option value="2">Waiting</option>
|
||||
<option value="3">Ongoing</option>
|
||||
<option value="4">Terminated</option>
|
||||
</selection>
|
||||
|
||||
<selection name="contract.version.invoicing.moment.select">
|
||||
<option value="1">End of period</option>
|
||||
<option value="2">Start of period</option>
|
||||
<option value="3">End of period plus</option>
|
||||
<option value="4">Start of period plus</option>
|
||||
</selection>
|
||||
|
||||
<selection name="contract.invoice.period.statut.select">
|
||||
<option value="1">Not invoiced</option>
|
||||
<option value="2">Invoiced</option>
|
||||
</selection>
|
||||
|
||||
<selection name="contract.target.type.select">
|
||||
<option value="1">Customer</option>
|
||||
<option value="2">Supplier</option>
|
||||
</selection>
|
||||
|
||||
<selection name="sequence.generic.code.select" id="contract.sequence.generic.code.select">
|
||||
<option value="customerContract">Customer contracts</option>
|
||||
<option value="supplierContract">Supplier contracts</option>
|
||||
</selection>
|
||||
|
||||
<selection name='iinvoice.operation.sub.type.select' id="contract.iinvoice.operation.sub.type.select">
|
||||
<option value='4'>Contract invoice</option>
|
||||
<option value='5'>Contract closing invoice</option>
|
||||
<option value='7'>Periodic contract</option>
|
||||
</selection>
|
||||
|
||||
<selection name="contract.batch.action.select">
|
||||
<option value="1">Invoicing</option>
|
||||
<option value="2">Terminate</option>
|
||||
<option value="3">Current version activation</option>
|
||||
<option value="4">Next version activation</option>
|
||||
</selection>
|
||||
|
||||
<selection name="account.analytic.move.line.type.select" id="contract.account.analytic.move.line.type.select">
|
||||
<option value="4">Forecast (contract)</option>
|
||||
</selection>
|
||||
|
||||
</object-views>
|
||||
@ -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.contract.test;
|
||||
|
||||
import com.axelor.app.AppModule;
|
||||
import com.axelor.auth.AuthModule;
|
||||
import com.axelor.db.JpaModule;
|
||||
import com.axelor.rpc.ObjectMapperProvider;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.inject.AbstractModule;
|
||||
|
||||
public class TestModule extends AbstractModule {
|
||||
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(ObjectMapper.class).toProvider(ObjectMapperProvider.class);
|
||||
install(new JpaModule("testUnit", true, true));
|
||||
install(new AuthModule());
|
||||
install(new AppModule());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
|
||||
<persistence-unit name="testUnit" transaction-type="RESOURCE_LOCAL">
|
||||
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
||||
<exclude-unlisted-classes />
|
||||
<properties>
|
||||
|
||||
<!--
|
||||
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver" />
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/testdb" />
|
||||
-->
|
||||
<property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver" />
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:test" />
|
||||
|
||||
<property name="javax.persistence.jdbc.user" value="sa" />
|
||||
<property name="javax.persistence.jdbc.password" value="" />
|
||||
|
||||
<!--
|
||||
value="create" to build a new database on each run;
|
||||
value="update" to modify an existing database;
|
||||
value="create-drop" means the same as "create" but also drops tables when Hibernate closes;
|
||||
value="validate" makes no changes to the database
|
||||
-->
|
||||
<property name="hibernate.hbm2ddl.auto" value="none" />
|
||||
|
||||
<!--
|
||||
<property name="hibernate.show_sql" value="true"/>
|
||||
-->
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
</persistence>
|
||||
@ -0,0 +1,15 @@
|
||||
################################################################################
|
||||
# Application Configuration
|
||||
#
|
||||
# Note: This is an initial work. In future it will add more configuration
|
||||
# settings including database & log configuration.
|
||||
################################################################################
|
||||
|
||||
# Database settings
|
||||
# ~~~~~
|
||||
db.test.driver = org.postgresql.Driver
|
||||
db.test.ddl = none
|
||||
db.test.url = jdbc:postgresql://localhost:5432/abs
|
||||
db.test.user = axelor
|
||||
db.test.password = *******
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE xml>
|
||||
<configuration>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{40} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- Log everything for axelor -->
|
||||
<logger name="com.axelor" level="debug" />
|
||||
|
||||
<!-- Good for troubleshooting hibernate issues -->
|
||||
<!-- <logger name="org.hibernate" level="info" /> -->
|
||||
|
||||
<!-- Log all SQL DML statements as they are executed -->
|
||||
<!-- <logger name="org.hibernate.SQL" level="debug" /> -->
|
||||
<!-- <logger name="org.hibernate.engine.jdbc" level="debug" /> -->
|
||||
|
||||
<!-- Log all SQL DDL statements as they are executed -->
|
||||
<!-- <logger name="org.hibernate.tool.hbm2ddl" level="info" /> -->
|
||||
|
||||
<!-- Log all JDBC parameters -->
|
||||
<!-- <logger name="org.hibernate.type" level="all" /> -->
|
||||
|
||||
<!-- Log transactions -->
|
||||
<!-- <logger name="org.hibernate.transaction" level="debug" /> -->
|
||||
|
||||
<!-- Log L2-Cache -->
|
||||
<!-- <logger name="org.hibernate.cache" level="debug" /> -->
|
||||
|
||||
<!-- Log JDBC resource acquisition -->
|
||||
<!-- <logger name="org.hibernate.jdbc" level="trace" /> -->
|
||||
<!-- <logger name="org.hibernate.service.jdbc" level="trace" /> -->
|
||||
|
||||
<!-- Log connection pooling -->
|
||||
<!-- <logger name="com.zaxxer.hikari" level="info" /> -->
|
||||
|
||||
<root level="error">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user