-
Notifications
You must be signed in to change notification settings - Fork 580
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Value on Processed Product Computing Method (#17997)
* Add Value on Processed Product Computing Method refs: #17996
- Loading branch information
Showing
8 changed files
with
299 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...puting/purchasecontract/addedvalue/processedproduct/AVProcessedManufacturingOrderLog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* #%L | ||
* de.metas.contracts | ||
* %% | ||
* Copyright (C) 2024 metas GmbH | ||
* %% | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as | ||
* published by the Free Software Foundation, either version 2 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* 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 General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public | ||
* License along with this program. If not, see | ||
* <http://www.gnu.org/licenses/gpl-2.0.html>. | ||
* #L% | ||
*/ | ||
|
||
package de.metas.contracts.modular.computing.purchasecontract.addedvalue.processedproduct; | ||
|
||
import de.metas.contracts.modular.ModularContractService; | ||
import de.metas.contracts.modular.computing.purchasecontract.sales.processed.ManufacturingFacadeService; | ||
import de.metas.contracts.modular.computing.purchasecontract.sales.processed.ManufacturingReceipt; | ||
import de.metas.contracts.modular.invgroup.interceptor.ModCntrInvoicingGroupRepository; | ||
import de.metas.contracts.modular.workpackage.IModularContractLogHandler; | ||
import de.metas.contracts.modular.workpackage.impl.AbstractManufacturingOrderLogHandler; | ||
import de.metas.product.ProductId; | ||
import lombok.NonNull; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class AVProcessedManufacturingOrderLog extends AbstractManufacturingOrderLogHandler | ||
{ | ||
public AVProcessedManufacturingOrderLog( | ||
@NonNull final ModCntrInvoicingGroupRepository modCntrInvoicingGroupRepository, | ||
@NonNull final ModularContractService modularContractService, | ||
@NonNull final ManufacturingFacadeService manufacturingFacadeService, | ||
@NonNull final AVProcessedComputingMethod computingMethod) | ||
{ | ||
super(modCntrInvoicingGroupRepository, modularContractService, manufacturingFacadeService, computingMethod); | ||
} | ||
|
||
@Override | ||
public boolean applies(@NonNull final CreateLogRequest request) | ||
{ | ||
return manufacturingFacadeService.getManufacturingReceiptIfApplies(request.getRecordRef()).isPresent(); | ||
} | ||
|
||
@NonNull | ||
@Override | ||
protected ProductId extractProductIdToLog( | ||
@NonNull final IModularContractLogHandler.CreateLogRequest request, | ||
@NonNull final ManufacturingReceipt manufacturingReceipt) | ||
{ | ||
return request.getProductId(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.