Skip to content

Commit b462305

Browse files
Syncing with version 25.0.20074.0 (#26546)
Fixes [AB#420000](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/420000) --------- Co-authored-by: Alexander Holstrup <[email protected]>
1 parent 72f4f07 commit b462305

File tree

164 files changed

+15125
-2539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+15125
-2539
lines changed

.github/AL-Go-Settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"runs-on": "windows-latest",
66
"cacheImageName": "",
77
"UsePsSession": false,
8-
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/25.0.19547.0/base",
8+
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/25.0.20074.0/base",
99
"country": "base",
1010
"useProjectDependencies": true,
1111
"repoVersion": "25.0",

Apps/CZ/AdvancePaymentsLocalization/app/Src/Codeunits/MatchBankPaymentHandlerCZZ.Codeunit.al

+13
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ codeunit 31390 "Match Bank Payment Handler CZZ"
4141
SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ";
4242
CustomerBankAccount: Record "Customer Bank Account";
4343
begin
44+
OnBeforeFillMatchBankPaymentBufferSalesAdvance(SalesAdvLetterHeaderCZZ, SearchRuleLineCZB, TempMatchBankPaymentBufferCZB, GenJournalLine);
4445
SalesAdvLetterHeaderCZZ.SetRange(Status, SalesAdvLetterHeaderCZZ.Status::"To Pay");
4546
if (GenJournalLine."Account Type" = GenJournalLine."Account Type"::Customer) and
4647
(GenJournalLine."Account No." <> '')
@@ -96,6 +97,7 @@ codeunit 31390 "Match Bank Payment Handler CZZ"
9697
PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ";
9798
VendorBankAccount: Record "Vendor Bank Account";
9899
begin
100+
OnBeforeFillMatchBankPaymentBufferPurchaseAdvance(PurchAdvLetterHeaderCZZ, SearchRuleLineCZB, TempMatchBankPaymentBufferCZB, GenJournalLine);
99101
PurchAdvLetterHeaderCZZ.SetRange(Status, PurchAdvLetterHeaderCZZ.Status::"To Pay");
100102
if (GenJournalLine."Account Type" = GenJournalLine."Account Type"::Vendor) and
101103
(GenJournalLine."Account No." <> '')
@@ -181,4 +183,15 @@ codeunit 31390 "Match Bank Payment Handler CZZ"
181183
AdvanceSearchRuleLineCZB.Validate("Search Scope", AdvanceSearchRuleLineCZB."Search Scope"::"Advance CZZ");
182184
AdvanceSearchRuleLineCZB.Insert(true);
183185
end;
186+
187+
[IntegrationEvent(false, false)]
188+
local procedure OnBeforeFillMatchBankPaymentBufferPurchaseAdvance(var PurchAdvLetterHeaderCZZ: Record "Purch. Adv. Letter Header CZZ"; SearchRuleLineCZB: Record "Search Rule Line CZB"; TempMatchBankPaymentBufferCZB: Record "Match Bank Payment Buffer CZB"; GenJournalLine: Record "Gen. Journal Line")
189+
begin
190+
end;
191+
192+
[IntegrationEvent(false, false)]
193+
local procedure OnBeforeFillMatchBankPaymentBufferSalesAdvance(var SalesAdvLetterHeaderCZZ: Record "Sales Adv. Letter Header CZZ"; SearchRuleLineCZB: Record "Search Rule Line CZB"; TempMatchBankPaymentBufferCZB: Record "Match Bank Payment Buffer CZB"; GenJournalLine: Record "Gen. Journal Line")
194+
begin
195+
end;
196+
184197
}

Apps/CZ/CoreLocalizationPack/app/Src/Codeunits/GenJnlPostLineHandlerCZL.Codeunit.al

+24
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// ------------------------------------------------------------------------------------------------
55
namespace Microsoft.Finance.GeneralLedger.Posting;
66

7+
using Microsoft.Sales.Customer;
78
using Microsoft.Finance.GeneralLedger.Journal;
89
using Microsoft.Finance.GeneralLedger.Ledger;
910
using Microsoft.Finance.GeneralLedger.Setup;
@@ -375,6 +376,29 @@ codeunit 31315 "Gen.Jnl. Post Line Handler CZL"
375376
IsHandled := PersistConfirmResponseCZL.GetPersistentResponse();
376377
end;
377378

379+
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Gen. Jnl.-Post Line", 'OnBeforePostDtldCVLedgEntry', '', false, false)]
380+
local procedure OnBeforePostDtldCVLedgEntry(sender: Codeunit "Gen. Jnl.-Post Line"; var GenJournalLine: Record "Gen. Journal Line"; var DetailedCVLedgEntryBuffer: Record "Detailed CV Ledg. Entry Buffer"; var AccNo: Code[20]; var IsHandled: Boolean; AddCurrencyCode: Code[10]; MultiplePostingGroups: Boolean)
381+
var
382+
CustomerPostingGroup: Record "Customer Posting Group";
383+
OldCorrection: Boolean;
384+
begin
385+
if IsHandled then
386+
exit;
387+
388+
if MultiplePostingGroups and
389+
(DetailedCVLedgEntryBuffer."Entry Type" = DetailedCVLedgEntryBuffer."Entry Type"::Application)
390+
then begin
391+
CustomerPostingGroup.Get(GenJournalLine."Posting Group");
392+
if AccNo = CustomerPostingGroup.GetReceivablesAccount() then begin
393+
OldCorrection := GenJournalLine.Correction;
394+
GenJournalLine.Correction := true;
395+
sender.CreateGLEntry(GenJournalLine, AccNo, DetailedCVLedgEntryBuffer."Amount (LCY)", 0, DetailedCVLedgEntryBuffer."Currency Code" = AddCurrencyCode);
396+
GenJournalLine.Correction := OldCorrection;
397+
IsHandled := true;
398+
end;
399+
end;
400+
end;
401+
378402
[IntegrationEvent(false, false)]
379403
local procedure OnBeforeUpdateVATAmountOnAfterInitVAT(var GenJournalLine: Record "Gen. Journal Line"; var GLEntry: Record "G/L Entry"; var IsHandled: Boolean)
380404
begin

Apps/CZ/CoreLocalizationPack/app/Src/Reports/PurchaseOrder.rdl

-12
Original file line numberDiff line numberDiff line change
@@ -4376,9 +4376,6 @@ End Function</Code>
43764376
<Field Name="UoMLbl">
43774377
<DataField>UoMLbl</DataField>
43784378
</Field>
4379-
<Field Name="CreatorLbl">
4380-
<DataField>CreatorLbl</DataField>
4381-
</Field>
43824379
<Field Name="SubtotalLbl">
43834380
<DataField>SubtotalLbl</DataField>
43844381
</Field>
@@ -4619,15 +4616,6 @@ End Function</Code>
46194616
<Field Name="InvDiscountAmount_PurchaseLineFormat">
46204617
<DataField>InvDiscountAmount_PurchaseLineFormat</DataField>
46214618
</Field>
4622-
<Field Name="FullName_Employee">
4623-
<DataField>FullName_Employee</DataField>
4624-
</Field>
4625-
<Field Name="PhoneNo_Employee">
4626-
<DataField>PhoneNo_Employee</DataField>
4627-
</Field>
4628-
<Field Name="CompanyEMail_Employee">
4629-
<DataField>CompanyEMail_Employee</DataField>
4630-
</Field>
46314619
</Fields>
46324620
<Query>
46334621
<DataSourceName>DataSource</DataSourceName>
Binary file not shown.

Apps/CZ/CoreLocalizationPack/app/Src/Reports/SalesInvoice.rdl

-9
Original file line numberDiff line numberDiff line change
@@ -5714,15 +5714,6 @@ End Function</Code>
57145714
<Field Name="VATLbl">
57155715
<DataField>VATLbl</DataField>
57165716
</Field>
5717-
<Field Name="PrepayedLbl">
5718-
<DataField>PrepayedLbl</DataField>
5719-
</Field>
5720-
<Field Name="TotalAfterPrepayedLbl">
5721-
<DataField>TotalAfterPrepayedLbl</DataField>
5722-
</Field>
5723-
<Field Name="PaymentsLbl">
5724-
<DataField>PaymentsLbl</DataField>
5725-
</Field>
57265717
<Field Name="DisplayAdditionalFeeNote">
57275718
<DataField>DisplayAdditionalFeeNote</DataField>
57285719
</Field>
Binary file not shown.

Apps/FR/IntrastatFR/app/AppResources/FR_DataExchDefMap.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
</DataExchLineDef>
1515
<DataExchLineDef LineType="1" Code="2-SENDER" ColumnCount="0" DataLineTag="/INSTAT/Envelope" ParentCode="1-HEADER">
1616
<DataExchColumnDef ColumnNo="1" Name="Party" Show="false" DataType="0" Path="/Party[@partyType=&quot;PSI&quot; and @partyRole=&quot;sender&quot;]" TextPaddingRequired="false" Justification="0" UseNodeNameAsValue="false" BlankZero="false" ExportIfNotBlank="false" />
17-
<DataExchColumnDef ColumnNo="2" Name="partyType" Show="false" DataType="0" Path="/Party[@partyType]" TextPaddingRequired="false" Justification="0" UseNodeNameAsValue="false" BlankZero="false" ExportIfNotBlank="false" />
18-
<DataExchColumnDef ColumnNo="3" Name="partyRole" Show="false" DataType="0" Path="/Party[@partyRole]" TextPaddingRequired="false" Justification="0" UseNodeNameAsValue="false" BlankZero="false" ExportIfNotBlank="false" />
17+
<DataExchColumnDef ColumnNo="2" Name="partyType" Show="false" DataType="0" Path="/Party[@partyType]" TextPaddingRequired="false" Justification="0" UseNodeNameAsValue="false" BlankZero="false" ExportIfNotBlank="true" />
18+
<DataExchColumnDef ColumnNo="3" Name="partyRole" Show="false" DataType="0" Path="/Party[@partyRole]" TextPaddingRequired="false" Justification="0" UseNodeNameAsValue="false" BlankZero="false" ExportIfNotBlank="true" />
1919
<DataExchColumnDef ColumnNo="4" Name="partyId" Show="false" DataType="0" Path="/Party/partyId" TextPaddingRequired="false" Justification="0" UseNodeNameAsValue="false" BlankZero="false" ExportIfNotBlank="false" />
2020
<DataExchColumnDef ColumnNo="5" Name="partyName" Show="false" DataType="0" Path="/Party/partyName" TextPaddingRequired="false" Justification="0" UseNodeNameAsValue="false" BlankZero="false" ExportIfNotBlank="false" />
2121
<DataExchMapping TableId="79" Name="" MappingCodeunit="1269">

Apps/FR/IntrastatFR/app/src/IntrastatReportFRUpgrade.Codeunit.al

+33
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ codeunit 10857 IntrastatReportFRUpgrade
55
trigger OnUpgradePerCompany()
66
begin
77
UpdateLinesType();
8+
UpdateColumnsDataExchangeDef();
89
end;
910

1011
local procedure UpdateLinesType()
@@ -28,8 +29,40 @@ codeunit 10857 IntrastatReportFRUpgrade
2829
UpgradeTag.SetUpgradeTag(GetIntrastatTypeUpdateTag());
2930
end;
3031

32+
local procedure UpdateColumnsDataExchangeDef()
33+
var
34+
DataExchColumnDef: Record "Data Exch. Column Def";
35+
UpgradeTag: Codeunit "Upgrade Tag";
36+
begin
37+
//Set "Export If Not Blank" = true for partyType and partyRole columns
38+
if UpgradeTag.HasUpgradeTag(GetUpdateColumnsDataExchangeDefTag()) then
39+
exit;
40+
41+
DataExchColumnDef.SetRange("Data Exch. Def Code", 'INTRA-2022-FR');
42+
DataExchColumnDef.SetRange("Data Exch. Line Def Code", '2-SENDER');
43+
DataExchColumnDef.SetFilter(Path, '%1|%2', '/Party[@partyType]', '/Party[@partyRole]');
44+
if DataExchColumnDef.IsEmpty() then
45+
exit;
46+
47+
DataExchColumnDef.ModifyAll("Export If Not Blank", true);
48+
49+
UpgradeTag.SetUpgradeTag(GetUpdateColumnsDataExchangeDefTag());
50+
end;
51+
3152
internal procedure GetIntrastatTypeUpdateTag(): Code[250]
3253
begin
3354
exit('MS-481518-IntrastatTypeUpdateFR-20230818');
3455
end;
56+
57+
internal procedure GetUpdateColumnsDataExchangeDefTag(): Code[250]
58+
begin
59+
exit('MS-527324-UpdateColumnsDataExchangeDef-20240522');
60+
end;
61+
62+
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Upgrade Tag", 'OnGetPerCompanyUpgradeTags', '', false, false)]
63+
local procedure RegisterPerCompanyTags(var PerCompanyUpgradeTags: List of [Code[250]])
64+
begin
65+
PerCompanyUpgradeTags.Add(GetUpdateColumnsDataExchangeDefTag());
66+
end;
67+
3568
}

Apps/IN/INGST/app/GSTBase/src/Codeunit/GSTBaseValidation.Codeunit.al

+22
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ codeunit 18001 "GST Base Validation"
196196
SignFactor := Getsign(DocTypeEnum, TransTypeEnum);
197197
end;
198198

199+
OnAfterUpdateGSTLedgerEntrySignFactor(Rec, SignFactor, DocTypeEnum, TransTypeEnum);
200+
199201
if Rec."Transaction Type" = Rec."Transaction Type"::Sales then begin
200202
Rec."GST Base Amount" := (Rec."GST Base Amount") * SignFactor;
201203
Rec."GST Amount" := (Rec."GST Amount") * SignFactor;
@@ -294,6 +296,8 @@ codeunit 18001 "GST Base Validation"
294296
SignFactor := Getsign(DocTypeEnum, TransTypeEnum);
295297
end;
296298

299+
OnAfterUpdateDetailedGSTLedgerEntrySignFactor(Rec, SignFactor, DocTypeEnum, TransTypeEnum);
300+
297301
if Rec."Transaction Type" = Rec."Transaction Type"::Sales then begin
298302
Rec."GST Base Amount" := (Rec."GST Base Amount") * SignFactor;
299303
Rec."GST Amount" := (Rec."GST Amount") * SignFactor;
@@ -321,6 +325,8 @@ codeunit 18001 "GST Base Validation"
321325
if (Rec."Amount Loaded on Item" <> Rec."GST Amount") and (Rec."Amount Loaded on Item" <> 0) and (Rec."GST Credit" = Rec."GST Credit"::"Non-Availment") then
322326
Rec."Amount Loaded on Item" := Rec."GST Amount";
323327

328+
OnAfterUpdateDetailedGstLedgerEntryAmountsField(Rec, SignFactor);
329+
324330
if (Rec."Transaction Type" = Rec."Transaction Type"::Sales) and (Rec."GST Place of Supply" = Rec."GST Place of Supply"::" ") then
325331
Rec."GST Place of Supply" := SalesReceivablesSetup."GST Dependency Type";
326332

@@ -1421,4 +1427,20 @@ codeunit 18001 "GST Base Validation"
14211427
local procedure OnAfterUpdateDetailedGstLedgerEntryOnafterInsertEventOnBeforeModify(var DetailedGSTLedgerEntry: Record "Detailed GST Ledger Entry"; GSTRegistrationNos: Record "GST Registration Nos."; var DetailedGSTLedgerEntryInfo: Record "Detailed GST Ledger Entry Info")
14221428
begin
14231429
end;
1430+
1431+
[IntegrationEvent(false, false)]
1432+
local procedure OnAfterUpdateDetailedGstLedgerEntryAmountsField(var DetailedGSTLedgerEntry: Record "Detailed GST Ledger Entry"; SignFactor: Integer)
1433+
begin
1434+
end;
1435+
1436+
[IntegrationEvent(false, false)]
1437+
local procedure OnAfterUpdateDetailedGSTLedgerEntrySignFactor(var DetailedGSTLedgerEntry: Record "Detailed GST Ledger Entry"; var SignFactor: Integer; DocTypeEnum: Enum Microsoft.Finance.GST.Base."Document Type Enum"; TransTypeEnum: Enum Microsoft.Finance.GST.Base."Transaction Type Enum")
1438+
begin
1439+
end;
1440+
1441+
[IntegrationEvent(false, false)]
1442+
local procedure OnAfterUpdateGSTLedgerEntrySignFactor(var GSTLedgerEntry: Record "GST Ledger Entry"; var SignFactor: Integer; DocTypeEnum: Enum Microsoft.Finance.GST.Base."Document Type Enum"; TransTypeEnum: Enum Microsoft.Finance.GST.Base."Transaction Type Enum")
1443+
begin
1444+
end;
1445+
14241446
}

Apps/IN/INGST/app/GSTPurchase/src/tableextension/GSTPurchaseLineExt.TableExt.al

+67-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace Microsoft.Purchases.Document;
77
using Microsoft.Finance.GST.Base;
88
using Microsoft.Finance.GST.Purchase;
99
using Microsoft.Finance.GST.Subcontracting;
10+
using Microsoft.Foundation.UOM;
1011
using Microsoft.Manufacturing.Document;
1112
using Microsoft.Purchases.History;
1213

@@ -312,8 +313,8 @@ tableextension 18083 "GST Purchase Line Ext" extends "Purchase Line"
312313
SubOrderCompList.SetRange("Document Line No.", "Line No.");
313314
if SubOrderCompList.FindSet() then
314315
repeat
315-
SubOrderCompList.Validate("Quantity To Send", ("Deliver Comp. For" * SubOrderCompList."Quantity per"));
316-
if SubOrderCompList."Scrap %" <> 0 Then
316+
SubOrderCompList.Validate("Quantity To Send", GetQuantityToSendForSubOrderCompList(SubOrderCompList, "Deliver Comp. For"));
317+
if SubOrderCompList."Scrap %" <> 0 then
317318
SubOrderCompList."Quantity To Send" :=
318319
SubOrderCompList."Quantity To Send" + (SubOrderCompList."Quantity To Send" / 100) * SubOrderCompList."Scrap %";
319320

@@ -327,11 +328,11 @@ tableextension 18083 "GST Purchase Line Ext" extends "Purchase Line"
327328
SubOrderCompListVend.SetRange("Document Line No.", "Line No.");
328329
if SubOrderCompListVend.FindSet() then
329330
repeat
330-
SubOrderCompListVend.Validate("Qty. to Consume", "Qty. to Receive" * SubOrderCompListVend."Quantity per" * SubOrderCompListVend."Qty. per Unit of Measure");
331+
SubOrderCompListVend.Validate("Qty. to Consume", GetQtytoConsumeForSubOrderCompListVend(SubOrderCompListVend, "Qty. to Receive"));
331332
SubOrderCompListVend.Validate("Qty. to Return (C.E.)", "Qty. to Reject (C.E.)" * SubOrderCompListVend."Quantity per");
332333
SubOrderCompListVend.Validate("Qty. To Return (V.E.)", (SubOrderCompListVend."Quantity per" * "Qty. to Reject (V.E.)"));
333334
SubOrderCompListVend.Validate("Posting Date", "Posting Date");
334-
if SubOrderCompListVend."Scrap %" <> 0 Then begin
335+
if SubOrderCompListVend."Scrap %" <> 0 then begin
335336
SubOrderCompListVend."Qty. to Consume" += (SubOrderCompListVend."Qty. to Consume" / 100) * SubOrderCompListVend."Scrap %";
336337
SubOrderCompListVend."Qty. to Return (C.E.)" +=
337338
(SubOrderCompListVend."Qty. to Return (C.E.)" / 100) * SubOrderCompListVend."Scrap %";
@@ -402,6 +403,68 @@ tableextension 18083 "GST Purchase Line Ext" extends "Purchase Line"
402403
Error(ProdOrdReopenErr, "Prod. Order No.");
403404
end;
404405

406+
procedure GetQuantityToSendForSubOrderCompList(SubOrderCompList: Record "Sub Order Component List"; DeliverCompFor: Decimal): Decimal
407+
var
408+
ProdOrderComponent: Record "Prod. Order Component";
409+
UOMMgt: Codeunit "Unit of Measure Management";
410+
CalculatedQuantity: Decimal;
411+
begin
412+
Clear(CalculatedQuantity);
413+
ProdOrderComponent.Get(ProdOrderComponent.Status::Released, SubOrderCompList."Production Order No.", SubOrderCompList."Production Order Line No.", SubOrderCompList."Line No.");
414+
case ProdOrderComponent."Calculation Formula" of
415+
ProdOrderComponent."Calculation Formula"::" ":
416+
CalculatedQuantity := ProdOrderComponent."Quantity per";
417+
ProdOrderComponent."Calculation Formula"::Length:
418+
CalculatedQuantity := Round(ProdOrderComponent.Length * ProdOrderComponent."Quantity per", UOMMgt.QtyRndPrecision());
419+
ProdOrderComponent."Calculation Formula"::"Length * Width":
420+
CalculatedQuantity := Round(ProdOrderComponent.Length * ProdOrderComponent.Width * ProdOrderComponent."Quantity per", UOMMgt.QtyRndPrecision());
421+
ProdOrderComponent."Calculation Formula"::"Length * Width * Depth":
422+
CalculatedQuantity := Round(ProdOrderComponent.Length * ProdOrderComponent.Width * ProdOrderComponent.Depth * ProdOrderComponent."Quantity per", UOMMgt.QtyRndPrecision());
423+
ProdOrderComponent."Calculation Formula"::Weight:
424+
CalculatedQuantity := Round(ProdOrderComponent.Weight * ProdOrderComponent."Quantity per", UOMMgt.QtyRndPrecision());
425+
ProdOrderComponent."Calculation Formula"::"Fixed Quantity":
426+
CalculatedQuantity := ProdOrderComponent."Quantity per";
427+
else
428+
CalculatedQuantity := ProdOrderComponent.Quantity;
429+
end;
430+
431+
if ProdOrderComponent."Calculation Formula" = ProdOrderComponent."Calculation Formula"::"Fixed Quantity" then
432+
exit(CalculatedQuantity)
433+
else
434+
exit(CalculatedQuantity * DeliverCompFor);
435+
end;
436+
437+
procedure GetQtytoConsumeForSubOrderCompListVend(SubOrderCompListVend: Record "Sub Order Comp. List Vend"; QtytoReceive: Decimal): Decimal
438+
var
439+
ProdOrderComponent: Record "Prod. Order Component";
440+
UOMMgt: Codeunit "Unit of Measure Management";
441+
CalculatedQuantity: Decimal;
442+
begin
443+
Clear(CalculatedQuantity);
444+
ProdOrderComponent.Get(ProdOrderComponent.Status::Released, SubOrderCompListVend."Production Order No.", SubOrderCompListVend."Production Order Line No.", SubOrderCompListVend."Line No.");
445+
case ProdOrderComponent."Calculation Formula" of
446+
ProdOrderComponent."Calculation Formula"::" ":
447+
CalculatedQuantity := ProdOrderComponent."Quantity per";
448+
ProdOrderComponent."Calculation Formula"::Length:
449+
CalculatedQuantity := Round(ProdOrderComponent.Length * ProdOrderComponent."Quantity per", UOMMgt.QtyRndPrecision());
450+
ProdOrderComponent."Calculation Formula"::"Length * Width":
451+
CalculatedQuantity := Round(ProdOrderComponent.Length * ProdOrderComponent.Width * ProdOrderComponent."Quantity per", UOMMgt.QtyRndPrecision());
452+
ProdOrderComponent."Calculation Formula"::"Length * Width * Depth":
453+
CalculatedQuantity := Round(ProdOrderComponent.Length * ProdOrderComponent.Width * ProdOrderComponent.Depth * ProdOrderComponent."Quantity per", UOMMgt.QtyRndPrecision());
454+
ProdOrderComponent."Calculation Formula"::Weight:
455+
CalculatedQuantity := Round(ProdOrderComponent.Weight * ProdOrderComponent."Quantity per", UOMMgt.QtyRndPrecision());
456+
ProdOrderComponent."Calculation Formula"::"Fixed Quantity":
457+
CalculatedQuantity := ProdOrderComponent."Quantity per";
458+
else
459+
CalculatedQuantity := ProdOrderComponent.Quantity;
460+
end;
461+
462+
if ProdOrderComponent."Calculation Formula" = ProdOrderComponent."Calculation Formula"::"Fixed Quantity" then
463+
exit(CalculatedQuantity)
464+
else
465+
exit(CalculatedQuantity * QtytoReceive * ProdOrderComponent."Qty. per Unit of Measure");
466+
end;
467+
405468
var
406469
ClosedStatusErr: Label 'No Transaction allowed; Status is Closed.';
407470
InvalidQtyErr: label 'Quantity should be less than or equal to outstanding quantity.';

0 commit comments

Comments
 (0)