Sales Distribution
From UG
(→Changes to Sales Invoices) |
|||
(37 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
- | [[Category: | + | [[Category:Projects]] |
== Info == | == Info == | ||
Line 27: | Line 27: | ||
=== Core logic === | === Core logic === | ||
- | + | Currently if invoice is issued against one or more grouped CTs we associate that sales information with entire group. | |
- | All new logic is used for both Sales Invoices and Credit Notes. | + | That is how it is stored in database and that is how it is available in reports. |
+ | |||
+ | New logic will associate sales charges with individual CTs within a group. Info will be stored in DB in a different way to accommodate that. | ||
+ | |||
+ | As a result charges will be "posted against individual CTs" and each CT will have its own gross margin and P/L. | ||
+ | |||
+ | All new logic is used for both Sales Invoices and Credit Notes. | ||
+ | |||
+ | === Changes to Sales Invoices === | ||
Interface for issuing sales invoice '''for grouped CTs''' will change. | Interface for issuing sales invoice '''for grouped CTs''' will change. | ||
- | + | Decision related to what and how to associate amounts with specific CTs will be done '''per line''' item in TOC table. | |
- | + | Each line is linked to unique charge code (CC). | |
- | + | ==== M/I class ==== | |
- | + | ||
- | + | ||
- | + | ||
- | + | CC can be of two types "Master"(M) or "Individual"(I). Let's call it '''"M/I class"''' | |
- | + | M/I class selector will be added to TOC line item interface. | |
- | * CTs | + | |
- | * | + | Default is set as defined in [[Charge Code Admin]]. |
+ | |||
+ | ==== CBV type ==== | ||
+ | |||
+ | [[CBV]] type selector will be added to TOC line item interface. | ||
+ | |||
+ | Default is set as defined in [[Charge Code Admin]]. | ||
+ | |||
+ | To remind CBV type (Chargeable Weight vs Gross Weight vs CBM vs CT Count) dictates how to distribute charges entered across selected CTs. We use similar logic for PIs. | ||
+ | |||
+ | ==== Invoice level CT list ==== | ||
+ | |||
+ | As it is currently done system will ask user to "Select CTs in the group" when user clicks "Create new invoice button". | ||
+ | |||
+ | User will select a subset of CTs in the group relevant to this invoice. | ||
+ | |||
+ | Let's call it "'''Invoice level CT list'''". | ||
+ | |||
+ | For line items that have [[#M/I class]] = "M" system will distribute charges across this list. | ||
+ | |||
+ | ==== TOC line item level CT list ==== | ||
+ | |||
+ | This is a new feature. If TOC line item has [[#M/I class]] = "I" then system will ask user to select a list of CTs across which to distribute charges. This list is a subset of [[#Invoice level CT list]]. | ||
+ | |||
+ | Let's call it '''TOC line item level CT list'''. | ||
+ | |||
+ | ==== Summary of new UI controls ==== | ||
+ | |||
+ | To summarize the following new controls will be added at the TOC line item level: | ||
+ | |||
+ | * M/I selector | ||
+ | * CBV selector | ||
+ | * CT selector (for I-charges) | ||
+ | |||
+ | ==== Change in parameters ==== | ||
+ | |||
+ | Sales amounts will be assigned at the moment of creating/saving Invoice and BUT can change. | ||
+ | |||
+ | More specifically change in parameters that define distribution WILL force re-distribution: | ||
+ | |||
+ | * if CTs are added or removed from group | ||
+ | * if CBV type changes | ||
+ | |||
+ | Please note that this is SAME as PI philosophy of recalculating amounts when parameters above change. | ||
+ | |||
+ | ==== Editing Sales Invoice ==== | ||
+ | |||
+ | Ability to edit Sales Invoice should be added. | ||
+ | |||
+ | In edit mode only the following fields are editable: | ||
+ | |||
+ | * M/I selector | ||
+ | * CBV selector | ||
+ | * CT selector (for I-charges) | ||
+ | |||
+ | === Changes to Credit Notes === | ||
+ | |||
+ | CN issued against Invoice that was issued against group will change. | ||
+ | |||
+ | TOC will have same editable new fields: | ||
+ | |||
+ | * M/I selector | ||
+ | * CBV selector | ||
+ | * CT selector (for I-charges) | ||
+ | |||
+ | Amounts of course also will be editable. | ||
+ | |||
+ | Also, we should be able to add lines to TOC as usual. | ||
+ | |||
+ | Still total sum of credit should not excede total amount of invoice. | ||
+ | |||
+ | ! Distribution should be based on values of parameters at the moment of issuing credit note and not at the moment of issuing invoice. | ||
+ | |||
+ | === Changes to Internal Invoices === | ||
+ | |||
+ | Since internal Invoice / Credit Note Interface mirrors that of Sales Invoice / Credit Note re-design as defined above. | ||
+ | |||
+ | This info will be used in reports such as P/L Tab and P/L Report. | ||
+ | |||
+ | Cases: | ||
+ | |||
+ | * manually generated invoices | ||
+ | * automatically generated | ||
+ | |||
+ | === Changes to GMS === | ||
+ | |||
+ | No change required. | ||
+ | |||
+ | ==== GM Split Log ==== | ||
+ | |||
+ | Leave this as is for now. | ||
+ | |||
+ | In the future we could report per CT vs per group as is now. | ||
+ | |||
+ | === Changes to P and L tab of CT Editor === | ||
+ | |||
+ | This changes should be done in the '''first''' phase. | ||
+ | |||
+ | Have two options to view P/L for grouped CT on this tab: | ||
+ | |||
+ | * group P/L - as it is now | ||
+ | * individual CT P/L - now possible due to new logic implemented - all amount will be shown for particular CT | ||
+ | |||
+ | === Changes to P and L Report === | ||
+ | |||
+ | This changes should be done in the '''second''' phase. | ||
+ | |||
+ | Spec TBD. | ||
== Phases == | == Phases == | ||
Line 79: | Line 191: | ||
=== SOW 3 Pre-calculations === | === SOW 3 Pre-calculations === | ||
- | This is pending investigation and can be dropped/postponed. | + | This is pending investigation and can be dropped/postponed if speed is OK. |
=== SOW 4 Modify non KPi reports to show per CT sales amounts for grouped CTs === | === SOW 4 Modify non KPi reports to show per CT sales amounts for grouped CTs === | ||
Line 86: | Line 198: | ||
Spec: TBD. | Spec: TBD. | ||
+ | |||
+ | === SOW 5 Add control to show all CTs in GRP === | ||
+ | |||
+ | Add control/label to CT Editor and Viewer to show all CTs in GRP. | ||
+ | |||
+ | Kostya suggested: | ||
+ | |||
+ | * to add "link like label" that will show number of shipments in the group | ||
+ | * on click it will produce a pop-up with a list of CTs in the group | ||
+ | * add it above tabs |
Current revision as of 17:22, 5 November 2013
Contents |
[edit] Info
This is a project.
It will impact different components of CT2.
It will have multiple phases.
Parent mantis: 0004230.
[edit] Business Need
Main business need Is to accommodate distribution of sales amounts across the CTs in the group. This will allow to report on sales amounts and gross margin on individual CT level.
Currently if CTs are grouped into GRP group sales figures and gross margin figures are only available for entire GRP and not individual CTs that are part of given group.
Main idea on how to manage this distribution is similar to what we are doing on purchase side. But not all logic is identical.
First component that will benefit from this is KPIs module.
In the future we can use this in other reports.
[edit] Analysis and Solution
[edit] Core logic
Currently if invoice is issued against one or more grouped CTs we associate that sales information with entire group.
That is how it is stored in database and that is how it is available in reports.
New logic will associate sales charges with individual CTs within a group. Info will be stored in DB in a different way to accommodate that.
As a result charges will be "posted against individual CTs" and each CT will have its own gross margin and P/L.
All new logic is used for both Sales Invoices and Credit Notes.
[edit] Changes to Sales Invoices
Interface for issuing sales invoice for grouped CTs will change.
Decision related to what and how to associate amounts with specific CTs will be done per line item in TOC table.
Each line is linked to unique charge code (CC).
[edit] M/I class
CC can be of two types "Master"(M) or "Individual"(I). Let's call it "M/I class"
M/I class selector will be added to TOC line item interface.
Default is set as defined in Charge Code Admin.
[edit] CBV type
CBV type selector will be added to TOC line item interface.
Default is set as defined in Charge Code Admin.
To remind CBV type (Chargeable Weight vs Gross Weight vs CBM vs CT Count) dictates how to distribute charges entered across selected CTs. We use similar logic for PIs.
[edit] Invoice level CT list
As it is currently done system will ask user to "Select CTs in the group" when user clicks "Create new invoice button".
User will select a subset of CTs in the group relevant to this invoice.
Let's call it "Invoice level CT list".
For line items that have #M/I class = "M" system will distribute charges across this list.
[edit] TOC line item level CT list
This is a new feature. If TOC line item has #M/I class = "I" then system will ask user to select a list of CTs across which to distribute charges. This list is a subset of #Invoice level CT list.
Let's call it TOC line item level CT list.
[edit] Summary of new UI controls
To summarize the following new controls will be added at the TOC line item level:
- M/I selector
- CBV selector
- CT selector (for I-charges)
[edit] Change in parameters
Sales amounts will be assigned at the moment of creating/saving Invoice and BUT can change.
More specifically change in parameters that define distribution WILL force re-distribution:
- if CTs are added or removed from group
- if CBV type changes
Please note that this is SAME as PI philosophy of recalculating amounts when parameters above change.
[edit] Editing Sales Invoice
Ability to edit Sales Invoice should be added.
In edit mode only the following fields are editable:
- M/I selector
- CBV selector
- CT selector (for I-charges)
[edit] Changes to Credit Notes
CN issued against Invoice that was issued against group will change.
TOC will have same editable new fields:
- M/I selector
- CBV selector
- CT selector (for I-charges)
Amounts of course also will be editable.
Also, we should be able to add lines to TOC as usual.
Still total sum of credit should not excede total amount of invoice.
! Distribution should be based on values of parameters at the moment of issuing credit note and not at the moment of issuing invoice.
[edit] Changes to Internal Invoices
Since internal Invoice / Credit Note Interface mirrors that of Sales Invoice / Credit Note re-design as defined above.
This info will be used in reports such as P/L Tab and P/L Report.
Cases:
- manually generated invoices
- automatically generated
[edit] Changes to GMS
No change required.
[edit] GM Split Log
Leave this as is for now.
In the future we could report per CT vs per group as is now.
[edit] Changes to P and L tab of CT Editor
This changes should be done in the first phase.
Have two options to view P/L for grouped CT on this tab:
- group P/L - as it is now
- individual CT P/L - now possible due to new logic implemented - all amount will be shown for particular CT
[edit] Changes to P and L Report
This changes should be done in the second phase.
Spec TBD.
[edit] Phases
Phase 1 will cover the following SOWs: 1, 2, 3.
Phase 2: TBD.
[edit] See Also
[edit] SOWs
[edit] SOW 1 Core logic and changes to Sales Invoices
mantis:
spec: implement these 2 sections - see below
[edit] SOW 2 Update KPI logic accordingly
We can now change all logic (cost logic, association, inclusion, etc) to be on per CT vs per Group basis.
Details pending discussion with Sasha.
[edit] SOW 3 Pre-calculations
This is pending investigation and can be dropped/postponed if speed is OK.
[edit] SOW 4 Modify non KPi reports to show per CT sales amounts for grouped CTs
This is phase 2.
Spec: TBD.
[edit] SOW 5 Add control to show all CTs in GRP
Add control/label to CT Editor and Viewer to show all CTs in GRP.
Kostya suggested:
- to add "link like label" that will show number of shipments in the group
- on click it will produce a pop-up with a list of CTs in the group
- add it above tabs