GMS
From UG
(→GM Split rules) |
(→Owners Office) |
||
Line 146: | Line 146: | ||
Relationship is one to one. | Relationship is one to one. | ||
- | Add this to "Part A." section on UI. | + | Add this to "Part A." section on UI. |
+ | |||
+ | Make sure changes are posted into Log. | ||
=== Import, Export and Third Offices === | === Import, Export and Third Offices === |
Revision as of 20:28, 24 February 2012
Contents
|
Info
Mantis
- 0003321 [Profit Sharing Module]
Scope
Covers this one module - Profit Sharing Module.
Team
Al = SA/PM
Sa = Lead Developer
Ko = Developer / DBA
Mi = Developer
Glossary
Business Requirements 1
Solution: prerequisites
OC status
At some point in the life of a shipment record it will not be updated anymore. Moreover some updates would become harmful. Therefore, certain types of functionality should be blocked for "old/mature" records. This would prevent undesirable situations such as:
- altering shipment weight after invoices has been issued
- issuing invoice before all PI/SI are in
- etc
Record that have limited functionality as far as updates/etc is called "closed" and should have status "closed". Otherwise it is "open".
We call this status "OC status" - (Open/Closed) status.
Values:
- closed before 2012
- open
- manually open
- closed
There are three ways to set this status: automatically, manually and by script.
Setting OC status automatically
When new shipment is created its status is automatically "open".
OC condition When OC status is "open" AND the number of days between Actual Date Of Departure and today's day becomes equal to #Closing Time Frame OC status would change automatically to "closed".
OC process
Tech Note There will be "OC process" checking OC condition and performing required actions. It will wake up once an hour.
Closing Time Frame
We need a table in the system that defines how many days shipment should stay open since it was created.
For every MOT this number is different.
Typical values:
Air - 35 days FCL - 60 days LCL - 70 days Truck (all 3 sub-modes) - 35 days
Number of days is editable field.
Set default as 1000.
Add this to User Access table.
Setting OC status manually
We need to provide functionality to manually:
- set status to "closed" on open and manually open CTs
- set status to "mannually open" on closed CTs (user who opened CT manually must close CT manually)
This is subject to user access permissions.
Suggested implementation: add "Close/Open file" button to P/L Tab.
OC status change trigger GMS status change
CTs that changed OC status to "closed" should trigger change of GMS Status to "pending GMS".
Closed CT have different permissions
CT (file) that has "closed" status should limit what operators can do with record. Operations such as invoicing should be blocked.
Implement in this SOW:
- generate sales invoice/credit note
- map PI invoice
Future SOWs:
- edit any/some CT fields
- posting into Com
- generating docs
- upload files
Add section to Admin to manage list above.
Setting OC status by script
All CTs that would close prior to Jan 1, 2012 (if this functionality would be available since the beginning) should have status "closed before 2012".
All CTs that would close from Jan 1, 2012 to Release day (if this functionality would be available since the beginning) should have status "closed before 2012" should have status "closed".
Tech Note -------- To achieve above we need to write and run appropriate scripts prior Release !
GMS status
GMS (Global Marging Split) Statuses:
- n/a: closed before 2012 - GMS status for CTs that have OC status "closed before 2012". Need script - see below.
- not ready for GMS - CTs that are "open" have this status
- pending GMS - CTs that changed status from open to closed should trigger change to "pending GMS" status
- GMS completed - after system runs Global Margin Split on this CT system successfully must change status to "completed"
- error - after system runs Global Margin Split on this CT system unsuccessfully (example: CT does not fall under any of GMS case)
Tech Note --------- Need to run script that will set n/a: closed before 2012 for all CTs that have OC status "closed before 2012".
Owners Office
Owners Office (OO) is a field (attribute) that identify what Jaguar office is the OO for particular Client Company - see Client Companies.
Relationship is one to one.
Add this to "Part A." section on UI.
Make sure changes are posted into Log.
Import, Export and Third Offices
EO, IO, TO are properties of CT and set on Gen Tab.
Identify and Display Offices, Statuses and GMS Case on Gen Tab
See mock up below.
Implementation Note Red Box A will be done under File Reference Numbers (by AK) and Red Box B will be done under this SOW by Sasha/Misha.
Add GM Split section to Admin
Add number of configuration options - see below.
Add under Acc > GM Split.
GM Split Rules
See table below.
%-ages must be stored in the system.
Need a view of current %s.
User could edit %s.
New edit of the table should have associated time frame (from date to date) affecting GM Split re-calculations.
Add this as a property into User Access table
GM ratio
More than one "GM ratio" (“percentage model”) could be applicable - more than one table as in Fig above could be defined.
Each case should have a name (optional, need textbox for that) and id generated by the system.
We should have one default "GM ratio", and then a number of alternative "GM ratio" (same scenarios, just different percentages). By default a Client Company would be subject to the ‘default’ model.
It means that "GM ratio" is a new property for Client Company entity.
Schedule for GM Split calculation
For example it would be possible to say that GM Split calculation will happen once a day at 17:00 EST
Credit to the office
Ability to post some credit from one office to another office.
This amount will be taken into account when calculating GM split.
Initially this list will be empty. Later someone could come and add lines similar to below:
Move 100,000.00 USD from NY to Paris office on February 15, 2012.
Table should have the following columns:
- from office
- to office
- amount
- currency
We should have a log of who posted and when.
Line can be edited only until it is used by GMS Runner.
Log for Admin Changes
Post all changes into Log.
SOW 2
- 0003322: [Profit Sharing Module] SOW 1 - part A - Sasha
Run GM Split and Generate Internal Invoices
System has to generate internal invoices between offices to re-distribute profit.
System would Run GM Split and Generate Internal Invoices periodically for example once a day.
Exact schedule would be defined here: #Schedule.
One invoice would cover many many CTs.
Algorithm for scheduled GM Split Run triggered by Scheduler
0) Identify CTs that are subject to GMS calculation this time (CTs with GMS status = "pending GMS" )
1) For every CT in the pool above calculate GM Split and post results into DB
2) after #1 is completed set GMS status = "GMS completed" or "error" for these CTs
3) create global internal interoffice invoices for above CTs that has become "GMS completed"
4) update Gen, Inv, P/L tabs to reflect that info
5) send e-mail (or post into Dashboard) simple report of CTs that have "GMS status"= error
Invoices generated by GM Split Runner
Number of invoices
There should be limited number of invoices issued each time Runner runs. It corresponds to num of unique pairs from the list of offices. In 2012 it would be:
- NY/HK
- NY/Lon
- NY/Par
- HK/Lon
- HK/Par
- Lon/Par
Layout
See mock up in Example below.
Apply new GMS split rules to GMS completed CTs
'!!! Spec changed !!!
This is the case when we want to change GM Split %ages and apply them not only in the future GMS runs but also recalculate for CTs that have GMS status completed.
This can be achieved by changing OC status for such group of CTs from closed to open to closed. This will force GMS status to be "pending" and next time GMS Runner runs it will re-adjust GMS for these CTs.
This can be done just by user - no programming required.
Example 1 (Non groupped CTs)
Let's look at the simple case.
Assume that GM Split Run found only one CT with GMS Status = pending.
Assume that this CT is CT#325563, AIR, JACKEL COSMETICS (HK) LTD from live site.
Gen Tab
Inv Tab
P n L Tab
Pdf mock up
Example 2 (Groupped CTs)
Solution: Acc Reports
We are changing the way we handle Internal Invoices. This could affect or even break some of the existing reports such as PnL Report for Multiple CTs (summary and detailed view).
List of Internal Invoices or Search Inv Report
We need some kind of way to see all Internal invoices generated by the System.
One option would be to re-use Search Internal Invoices report. See Mock up below with possible new layout.
This solution implies that you would be able to use various existing filters such as Issued from, etc.
Alternatively you could simply provide a list of invoices with paging sortable by Inv#, Issuing date. Ideally with fiber by Issuing office.
First release of this component could have simplest design possible (fastest to code) because of time pressure.
P n L for Multiple CTs
See screenshots below.
Major difference as far as structure of invoice/values that could affect how data is represented in DB and how reports are affected:
- invoice issued by = System (not operator)
- one invoice corresponds not just one CT or CT group but to any collection of CTs and groups (any mode, any Client)
Additional DB structure analysis required to answer that. Sasha/Kostya/Alex will discuss that.
SOW 1
- 0003403: [Profit Sharing Module] SOW 1 - Mi components
Code that manages GM Split related Admins
- EO, IO, TO (AK)
- OO in Client Company profile (Mi)
- split rules % table (Mi)
- schedule - Sa
- closing time frames - Sa
- credit to office - Mi
Code that blocks altering of closed records
- Create inventory of "links" from different places in the system that alter DB record for:
- CT
- Master
- Group
For that analyze code and front end (Roma).
This should include:
- TMS updates
- Air Status/EUAN
Add code that will block above altering if CT/Master/Group are closed.
Code that allows user to open close records
- open/close button to P/L screen
- add this to user access table
Code that resents view only version of closed records
Rework CT view:
- add missing fields
- add open/close button
- add edit button
- change layout to mimic CT editor
SOW 2
- 0003322 [Profit Sharing Module] SOW 2 - Sa components
SOW 3
- 0003448: [Profit Sharing Module] SOW 3 - KU components
SOW 4
Next version
DR KPI Reports
Additional OC Status based permissions
edit any/some CT fields posting into Com generating docs upload files
Questions
For KU / Sa
Roma: How should it work with grouped CTs ? IE1: We have three Grouped CT, 2 Closed and "pending" one opened ?? Should we run GMS procedure for two closed CTs ?
IE2: We have three closed CTs with GMS status "completed", and we manually oppened one of its and then closed it. It's GMS status changed to "pending" what about other two CTs ?
KU: I what currency to calculate P/L? In what currency issue invoice? Simplest solution is to calculate in USD and then if required to convert total for each interoffice invoice to say local currency.
Kostya: complex cases such as 2nd GM split Run for same CT
For Mi
For Mi: How to implement "close/open" mechanism? How closed CT, M would look like? Show view page? What is missing? What users do not like about it? Layout? What to change?