Temporary Tables In Mantiki (process_extract tables)
Sales are split into two temporary tables in Mantiki.
process_extract_dream_shipment
process_extract_dream_shipment_payment
MantikiFeed
Standard sales
...
dbo.sales
...
Preorders have some specific rules to follow.
- The dbo.sales_payment table must include both the initial payment of the deposit as an entry for eg £12 and upon redemption of the balance, there must be a second entry for the deposit as it is used as part payment for the balance.
- Where multiple items are preordered, the deposit should be credited all against the first item alphabetically, not spread evenly over the balance items:- ie the order with the suffix AA has all of the deposit credited against it. Where the deposit paid is greater than the value of the balance of the first item, only the value of the first item is used from the pool of the deposit and the remainder is credited against the next alphabetical item and so on. This has to be manufactured in the VW code as preorders in Mantiki work at a group level, not the level of the individual order.
Example below of a transaction where the deposit paid covers the price of one of the items fully
Stage 1, place preorder
dbo.sales
...
dbo.sales_payment
...
Stage 2, charge for balance
dbo.sales
...
dbo.sales_payment
...
High level structure
This is actually 2 Daemons. Firstly the data is read into temporary tables in Mantiki. A second Daemon runs to read the data from the temporary tables and write this into the MantikiFeed tables from which Finance harvest the data.
Temporary Tables In Mantiki (process_extract tables)
Temporary Tables In Mantiki (process_extract tables) - Sales