WiseFish Fishing and Quota - Test - Landing Fishing Trips

Part of WiseFish Fishing and Quota - Test (automated tests) - Overview. 40 tests in 4 test codeunits (84006-84009), all passing on a BC28 container (16.11.2026). Folder src/Fishing; test library 84005 WiFiFQT Library - Fishing Trip and subscriber 84010 WiFiFQT Land FT Subscriber.

Tests landing a fishing trip: WiFiFQ Land Fishing Trip (codeunit 23014300) and WiFiFQ FTrip Trade Mgt (codeunit 23014302), added in WFFQ-151. See Landing Fishing Trips for how landing works.

84006 WiFiFQT Land FT Checks (11 tests)

The checks made before a trip is landed.

#

Test

Scenario

Expected result

01

Check_01_VesselClosesTripWithoutLanding

A vessel marked Close FTrip without Landing.

The trip is Settled, not landed, and the user is told so.

02

Check_02_DeclinedConfirmLeavesTripUnchanged

The user says no when asked to land.

The trip is still in Registration with Landing No. 0.

03

Check_03_RawMaterialLocationRequired

A trip without a Raw Material Location.

Error naming the Raw Material Location.

04

Check_04_ProductLocationRequired

A trip without a Product Location.

Error naming the Product Location.

05

Check_05_CurrencyFactorRequired

A trip in a foreign currency without a currency factor.

Error naming the currency factor and the currency.

06

Check_06_UnflushedReceivingTransactions

The trip has receiving transactions that are not flushed.

Error: unflushed receiving transactions.

07

Check_07_UnflushedInboundToFishingTrip

The trip has Inbound to Fishing Trip entries that are not flushed.

Error: unflushed Inbound to Fishing Trip entries.

08

Check_08_RequiredDimension1Missing

Dimension 1 is required and a raw material line doesn't have it.

Error giving the number of lines and the dimension.

09

Check_09_RequiredDimension2Missing

Dimension 2 is required and a raw material line doesn't have it.

Error giving the number of lines and the dimension.

10

Check_10_ProductionLineWithStatusUpdate

A production line in status Update.

Error naming the trip, before the user is asked.

11

Check_11_ProductLineWithStatusUpdate

A product line in status Update.

Error naming the trip, before the user is asked.

84007 WiFiFQT Land FT External (11 tests)

Landing a trip of an external (3rd party) vessel without a purchase document (Land FT for External Vessel = Land or Ask).

#

Test

Scenario

Expected result

01

Ext_01_JustLandSetsTripLanded

Land FT for External Vessel = Land.

The trip is Landed with Landing No. 1, without a purchase document.

02

Ext_02_EmptyLinesAreDeleted

Lines without fish type, quantity or product, and a discarded line.

The empty lines are deleted; the other lines and the discarded line are kept.

03

Ext_03_ProductAndProductionLinesAreLanded

A trip with a product line and a production line.

Both get the trip's landing date and port, Line Landed and Landing No. 1.

04

Ext_04_BudgetLinesAreLanded

A trip with a budget line.

The budget line's Trip Status is Landed.

05

Ext_05_PartialLandingLandsOnlyPartialLines

Some product lines have status Partial.

The trip is Partially Landed; only the Partial lines are landed, not the budget line.

06

Ext_06_PartialLandingWithFutureDateUsesToday

A partial landing with a landing date after today.

The lines are landed today; the trip's landing date is unchanged. Own vessels: WFFQ-157.

07

Ext_07_PostQuotaAtLandingPostsRawMaterialQuota

A vessel with Post Quota at Landing.

One Catch quota entry for the fish type, from the trip and vessel, on the landing date.

08

Ext_08_WithoutPostQuotaAtLandingNoQuotaIsPosted

A vessel without Post Quota at Landing.

The trip is landed; no quota entry.

09

Ext_09_DeclinedMissingPriceStopsLanding

A product line without a price; the user says no.

Error naming the trip, the line and the product.

10

Ext_10_AskAndJustLandLandsTrip

Land FT for External Vessel = Ask; the user picks Just Land Trip.

The menu offers invoice, order or just land; the trip is Landed.

11

Ext_11_AskCancelledStopsLanding

Land FT for External Vessel = Ask; the user cancels.

Error: the trip was not landed.

84008 WiFiFQT Land FT Purch Doc (9 tests)

Landing a trip of an external vessel to a purchase invoice or order (LandToPurchInv_u). This code commits, so the tests have a codeunit of their own. The vendor, items, locations and G/L account come from Microsoft's test libraries, so the purchase lines use the company's posting setup.

#

Test

Scenario

Expected result

01

Purch_01_InvoiceForRawMaterialLine

Land FT for External Vessel = Invoice.

A purchase invoice for the trip's vendor, opened on page 51, with an item line for the raw material line (quantity, cost + bonus price).

02

Purch_02_OrderOpensPurchaseOrder

Land FT for External Vessel = Order.

A purchase order for the trip's vendor is created and opened.

03

Purch_03_TripVendorBeforeVesselOwner

The trip has a vendor and the vessel has an owner vendor.

The invoice is for the trip's vendor.

04

Purch_04_VesselOwnerWhenTripHasNoVendor

The trip has no vendor.

The invoice is for the vessel's owner.

05

Purch_05_NoVendorAndNoVesselOwnerFails

No trip vendor and no vessel owner.

Error naming the vessel's Owners Vendor No.

06

Purch_06_LineLocationAndLotCode

A raw material line with its own location and inbound lot code.

The purchase line has the line's location and lot code.

07

Purch_07_BudgetLineSplitsIntoFisherAndCompanyLines

A raw material line with a budget line.

Two item lines: the fisher's share without ACE fee, the company's share with it.

08

Purch_08_CostOfTripLine

A cost of the trip that posts to a G/L account.

A G/L account line for the cost.

09

Purch_09_NoLinesFails

A trip without raw material or product lines.

Error: there are no fishing trip lines.

84009 WiFiFQT Land FT Own Vessel (9 tests)

Landing a trip of an own vessel to inventory: the WiseFish TI journal lines. Subscriber 84010 copies each line on OnLandFishingTrip and stops the landing, so the lines are checked without being posted.

#

Test

Scenario

Expected result

01

Own_01_RawMaterialJournalLine

A raw material line of an own vessel.

A positive adjustment of trade items for the fish type, at the trip's location, stock center and processing stage.

02

Own_02_NegativeQuantityIsCredit

A raw material line with a negative quantity.

A negative adjustment that closes the trade item as a credit.

03

Own_03_CreditWithoutTradeItemFails

A negative quantity without Trade Item for Credit.

Error naming the Trade Item for Credit.

04

Own_04_GuttedQtyGoesToInventoryAtValueOfTotalQty

Deduct Guts from Inventory (WFFQ-98).

Only the gutted quantity goes to inventory, at a unit cost that keeps the total value.

05

Own_05_ForeignCurrencyUnitAmountInLCY

A trip in a foreign currency.

The unit amount is converted with the trip's currency factor.

06

Own_06_SizeGradeCreatesVariant

A raw material line with a size grade and no variant.

A new variant of the fish type for the size grade.

07

Own_07_GradeWithoutVariantNosFails

A size grade, no variant and no variant nos.

Error: the variant is missing.

08

Own_08_ProductJournalLine

A product line of an own vessel.

A positive adjustment of trade items (boxes) for the product.

09

Own_09_NoLinesAndDeclinedLandAnywayFails

No lines; the user says no to landing anyway.

Error: the trip was not landed.

Not covered

Landing corrections (LandCorrectedRawMat_u), automatic sales agreements at landing, and posting the TI journal to inventory. Open questions about landing are in WFFQ-152 (issues 8 and 9: WFFQ-157, WFFQ-158).