3. PS Ledger

Input Physical Trades Data

The New Physical Trade function allows users from different departments/teams to access the designated pages to input their data, ensuring a consistent operational workflow and clear delegation of responsibilities for different teams.

Please note that all data input in New Physical Trade will appear in the old Physical Trade page, and vice versa. Trades created in the New Physical Trade page will have their Actions column button disabled, which disallows editing of the trades in the old Physical Trade page.

Alternatively, you may choose to use the old methods to input your data:

1. Manually input physical trades, please access: https://mafint.atlassian.net/wiki/spaces/MCUGX/pages/2022506844

2. Bulk upload physical trades, please access: https://mafint.atlassian.net/wiki/spaces/MCUGX/pages/2022506555


3. Input Payment Data in PS Ledger

If this step is not required yet, please proceed to the next step and return to complete this step when necessary.

This section displays the details of your purchase and sale ledgers (payment received from counterparty or paid to counterparty) for all physical trades.

i. Please click on Trade, followed by New Physical Trade from the navigation sidebar on the left to enter the physical trade page,

and you will be directed to the PS Ledger page.

The system will follow this order of priority : Settlement Qty/Price > Estimated Price > Contract Actual Qty/Price > Qty/Provisional Price to calculate data.

Basic Functions

Outside Table:

  • Search Function

Input in the Search function to search for any keys in the table.


  • Filter based on Unassigned/Assigned

All payment items that have not been assigned Contract No. will be displayed in the Unassigned table. Once Contract No. has been added into the payment items and saved successfully, the items will be displayed in the Assigned table.

 


  • Date Range

The From Date is 1 month before today's date and To Date is today’s date by default. Please feel free to change the dates accordingly and click on the Search button. The dates will remain according to your settings until you log out.


  • Combination

  • Recalculate

  • Allocate

Please refer to below for more information


  • Add/Delete/Save/Undo

+ Add Row button: To add a new trade, click on the + button at the top right corner of the page to add a new row

Delete Row button: To delete the trades, tick the checkbox of the row and click on the Delete button at the top right corner of the page

Save button: When data has been input/updated, click on the Save button at the top right corner or bottom left corner of the page to save your data. Save button will always be loading if no reaction once clicked

Undo button: To undo your previous action, click on the Undo button at the top right corner or bottom left corner of the page


  • Save/Delete Table Layout Template

You can filter the columns (as well as rows) in the table according to your preferences and save the table layout by clicking on the “+” button at the bottom right corner of the page and naming and saving the table layout. For your convenience, whichever layout you last used will be automatically displayed in the table whenever you enter the page.

To delete the table layout, select the table layout and click on the bin button.

Please refer to https://mafint.atlassian.net/wiki/spaces/MCUGX/pages/989986838 for more information.


Inside Table:

  • Pin Columns

To pin columns to the left or right for individual or multiple headers, click on the icon next to each header


  • Aggregate/Sum up Values in Table

You can now click on an individual cell or highlight multiple cells to view aggregated summary at the bottom of all columns for all quantity and amount columns. In this case, 3 rows of 200 are highlighted so the aggregated summary will be 600. If you click elsewhere, the aggregated summary will reset to default - sum up all columns.

  • Table Height

You can right click in the table and select the table height to determine the number of rows to display in the table

  • small:15 rows

  • middle:20 rows

  • large:25 rows

 

 

  • All decimal points for numerical values will follow user’s setting (Setting>My Profile>System Format)

 

  • Reset Filter

To reset the filter, right-click in the table and click on Reset Filter. Filter will remain in cache until user logs out or click on Reset Filter

 

 

ii. All unassigned items (to Contract No.) are displayed in the table by default. You may select from the Unassigned/Assigned drop down list to viewed the unassigned or assigned trades accordingly. All payment items that have not been assigned Contract No. will be displayed in the Unassigned table. Once Contract No. has been added into the payment items and saved successfully, the items will be displayed in the Assigned table.

 

 

When COUNTERPARTY ≠ THIRD PARTY, COUNTERPARTY will be highlighted in green

iii. You can choose to upload or add your PS ledger/bank/payment statements items:

  • Hover your mouse cursor over the “…” icon at the top right corner of the page and click on Upload File to upload your excel file

    • Please make sure that the Counterparty column in Excel is exactly the same as the fields in company profile settings in Settings>Company>Company Profile (Company must match); otherwise, the Bank column will be in red in PS Ledger table and unable to edit, you may need to edit in your excel before uploading

    • Please make sure that the Bank column in Excel is exactly the same as the fields in bank account settings in Accounting page (Company, Bank and Ccy must match); otherwise, the Bank column will be in red in PS Ledger table and unable to edit, you may need to edit in your excel before uploading

    • Once you upload the file, you only need to fill in the Currency. You can select currency for the first row and all the rows at the bottom will be autofilled with the selected currency. You can change the currency for each row accordingly

  • Click on the '+ Add Row' button located above the table. Input the details (fields highlighted in red are compulsory fields) in the row accordingly. You may assign Contract No. to the payment items as necessary

Please refer to the definitions below for more information on how to input your data.

Unassigned Table

Please note that all data input in the Unassigned table in PS Ledger and Invoice (Receive) by groups with group type: Risk & Settlement is Company Level which means that all users in the same company group (same company profile) will be able to view the data. Once Contract No. has been assigned to the PSL or invoice items in the Unassigned table, they will appear in the Assigned table once saved.

Please note that the Assigned table is Group Level, which means that only users in the same group or users who are in the parent group of the users who assigned the contracts will be able to view the assigned PSL or invoice items.

[in MAF Admin account, all view, insert, delete settings for PSL and Invoice (Issue/Receive) are Group; update is Company - for Group Type: Operations and Business; Risk & Settlement is Company for all settings]

Please refer to below for more information on how to input the fields. Cells highlighted in red (indicated with * below) in the table are compulsory fields and are thus necessary to input:

  • PSL ID: Auto generated by system

  • Date*: Date when payment is paid/received

  • Contract No.: In order for contract numbers to be available for selection, you must select Company first and ensure Contract Actual Price and Contract Currency are accurate, and the corresponding contract numbers will be available in the Contract No. drop down list for selection. You can then fill in the Ledger Type (Paid to counterparty/Received from counterparty) and Amount first, followed by the other fields. Every purchase and sale contract should have its own contract number. Any contract number with 0 or close to 0 for Un Invoice Amount (un_inv_amt) or Un Payment Amount (un_payment_amt) will not appear in the drop down list as the contract has been fully settled

    • Un Payment Amount = Contract Amount (Input in Trades table, viewable in Contract No. dropdown list)- Payment/PSL Amount (Amount column in PS Ledger table)

  • Company*: Entity of contract, Name of your company (can be input in Settings>Company>Company Profile page). Input is required and once done, you can then double click Contract No. from the dropdown list to select Contract No. Otherwise, you may manually input.

  • Bank: Name of beneficiary bank, MUST be set up in Accounting>Bank Details page before you can select the bank name. Please note that the Company, Bank and Currency must be the same as those saved in the Accounting>Bank Details page, otherwise, Bank column will be empty and cannot be selected from dropdown list

  • Counterparty: Name of counterparty. Input is not required as it will be auto-filled if you select Contract No. from the dropdown list. Otherwise, you may manually input. Please note that if Counterparty and Third Party are different, Counterparty will be highlighted in green.

  • Third Party: If the payment is directed towards a party different from the counterparty listed, you may input the name of third party here. Please note that if Counterparty and Third Party are different, Counterparty will be highlighted in green.

  • Ledger Type*:

    • Purchase contract - Payment paid to counterparty (Paid) - Amount is positive value for purchase contract; if positive value in Amount is input, Ledger Type automatically becomes Paid

    • Sale contract - Payment received from counterparty (Received) - Amount is negative value for sale contract; if negative value in Amount is input, Ledger Type automatically becomes Received

  • DES: Description

  • AMOUNT*: Payment amount (paid to counterparty or received from counterparty). The amount input here will be used to recalculate Un Payment Amount immediately, which will be reflected in the Contract No. dropdown list: Un Payment Amount = Contract Amount (Input in Trades table, viewable in Contract No. dropdown list)- Payment/PSL Amount (Amount column in PS Ledger table)

    • If the amount input is negative, Ledger Type will automatically become PAID. If the amount is positive, Ledger Type will automatically become RECEIVED.

    • Repeat this step until Un Payment Amount is 0 (sum of all Amount columns in PS Ledger = Contract Amount) which means that the contract has been fully paid/settled, and the contract number will not be available for selection in the Contract No. dropdown list

  • Un Payment Amount: Will be empty, but will be available in Assigned table once assigned Contract No. Refers to the amount that has not been fully paid/received yet. Will be autofilled with the contract’s Contract Amount (for the first time, subsequent times will be the latest UnPayment Amount) once Contract No. is selected from drop down list by default. Once Amount column has been input in PS Ledger table, Un Payment Amount will be updated immediately in real-time to match the value in Un Payment Amt column in PS Ledger table. PSL Amount can be more than Contract Amount as some clients may pay eg 110% (Contract Amt will be shown in red but still allowed to save)

    • Un Payment Amount = Contract Amount (Input in Trades table, viewable in Contract No. dropdown list)- Payment/PSL Amount (Amount column in PS Ledger table)

CCY*: Currency of PS Ledger item, must be same as the Currency in put in Trades tab

REMARKS: Remarks

Once the necessary data is input, click on Save to save your data. Please note that once the table is saved, you will not be able to edit any data except Contract No.. To edit other data, you will need to delete the row and reinput the data.


iv. You may choose to assign a contract number before your save or after you save the table. After saving the data, all fields cannot be edited except for Contract No.

To assign a contract number to each payment item, please double click on “Contract No..” field and select, and the relevant fields (Company, Counterparty and Unpayment Amt) will be auto-filled according to the contract’s details in the dropdown list (if data is available).

  • Please note that for contract numbers to be available for selection in the dropdown list

    • Contract Actual Price has to be filled in the Trades table

    • Correct Company must be selected in the PS Ledger table

    • Correct Ccy must be selected in the PS Ledger table

    • Contracts have Un Payment Amount that is not 0, as those with 0 will signify that the contracts have been fully settled/paid

  • Repeat the same steps (create payment item and assign contract number) until Un Payment Amount is 0 for each contract (sum of all Amount columns in PS Ledger = Contract Amount) which means that the contract has been fully paid/settled, and the contract number will not be available for selection in the Contract No. dropdown list

    • Un Payment column for each contract will be the same as it will be recalculated after Amount column has been filled for each row and assigned to the contract. For example:

      • Payment amount is 100 on 01 Jun 2023 and another 100 on 02 Jun 2023. Contract amount is 1000 so Un Payment Amount for this contract will be 1000 - 100 - 100 = 800, which will be reflected for both rows since they belong to the same contract. Repeat this step until Un Payment Amount for the contract is 0, and the contract number will then disappear from the Contract No. dropdown list

  • The Contract No. dropdown list will be auto sorted by the latest contract date (Date in Trades tab) at the top of the list.

  • Any contract number with 0 or close to 0 for Un Invoice Amount (un_inv_amt) or Un Payment Amount (un_payment_amt) will not appear in the drop down list as the contract has been fully settled

 

Here are the items that will be displayed in the Contract No. drop down list:

  • Contract No.: Select Contract Number that was previously input in Trades tab, and relevant fields (Company, Counterparty and Unpayment Amt) will be autofilled in PS Ledger table. If Actual Qty has been input in Trades tab, Qty in Assigned table will be auto filled with Actual Qty, otherwise Contract Qty will be filled instead. The dropdown list in Contract No. is sorted by the latest contract date (DATE in TRADES tab) at the top of the list. if unpayment amt is 0, copy paste contract no should not work

    Please note that only contracts with Un Payment Amount that is not 0 will appear in the Contract No. dropdown list, as those with 0 will signify that the contracts have been fully settled/paid.

  • Main Contract No.

  • Phy Trade ID

  • Trade Date

  • Purchase/Sale

  • Company

  • Counterparty: Counterparty input in Trades tab, will autofill Counterparty column in PS Ledger table once selected

  • Quantity: Map to qty; Quantity will be displayed in order of priority: settlement qty>contract actual qty>qty

  • Price: Map to price; Price will be displayed in order of priority: settlement price>estimated price>contract actual price>provisional price]

  • Un Payment Amount: Refers to the amount that has not been fully paid/received yet. Will be autofilled with the contract’s Contract Amount (for the first time, subsequently will be autofilled with latest UnPayment Amount) once Contract No. is selected from drop down list by default. Once Amount column has been input in PS Ledger table, Un Payment Amount will be updated immediately in real-time to match the value in Un Payment Amt column in PS Ledger table

    • Un Payment Amount = Contract Amount (Input in Trades table, viewable in Contract No. dropdown list)- Payment/PSL Amount (Amount column in PS Ledger table)

    • Un Payment Amt = Contract Amt if Payment Amt is empty, as Un Payment Amt = Contract Amt - Payment Amt

    • Un Payment Amount in table/dropdown list of contract (before saving) will change in any of the below conditions:

      1: Assign contract no to PSL

      2: change the contract no (from A to B )

      3: Delete the contract no

      4: delete row with contract no

      5: change PSL amt with contract no

  • Contract Amount (Contract Actual Qty * Contract Actual Price, calculated in Trades tab)

 

Please note that:

  • Before you can assign Contract No., you will need to select the Company first, and the corresponding Contract No. will be available for selection in the Contract No. column.

  • If Contract No. has not been selected yet aka these fields are empty, they will be auto-filled: Company, Counterparty and Unpayment Amt, if “Contract No.” is selected

  • If Contract No. has been selected previously aka these fields are already filled, similarly, only Company, Counterparty and Unpayment Amt will change according to the Contract No. So you will need to adjust the rest of the fields manually

  • Once you save the data in the table, you will not be able to edit any fields except Contract No. column. You will be able to edit the data before you save your data.

  • Contract No: Key column linked to “PHYSICAL TRADE STATUS” 现货合同状态 app to monitor payment and invoice record.

 


 

Assigned Table

Please note that all data input in the Unassigned table in PS Ledger and Invoice (Receive) by groups with group type: Risk & Settlement is Company Level which means that all users in the same company group (same company profile) will be able to view the data. Once Contract No. has been assigned to the PSL or invoice items in the Unassigned table, they will appear in the Assigned table once saved.

Please note that the Assigned table is Group Level, which means that only users in the same group or users who are in the parent group of the users who assigned the contracts will be able to view the assigned PSL or invoice items.

[in MAF Admin account, all view, insert, delete settings for PSL and Invoice (Issue/Receive) are Group; update is Company - for Group Type: Operations and Business; Risk & Settlement is Company for all settings]

Please refer to below for more information on how to input the fields. Cells highlighted in red (indicated with * below) in the table are compulsory fields and are thus necessary to input:

All columns are uneditable after saving except Contract No.

When add new row, all columns are editable except PSL ID, Main Contract No., Qty, Price, Un Payment Amount, as they will be auto filled once Contract No. is selected

  • PSL ID: Auto generated by system. Will be autofilled by inputs in Unassigned table

  • Date*: Date when payment is paid/received. Will be autofilled by inputs in Unassigned table

  • Contract No.: In order for contract numbers to be available for selection, you must select Company first and ensure Contract Actual Price and Contract Currency are accurate, and the corresponding contract numbers will be available in the Contract No. drop down list for selection. You can then fill in the Ledger Type (Paid to counterparty/Received from counterparty) and Amount first, followed by the other fields. Every purchase and sale contract should have its own contract number. Any contract number with 0 or close to 0 for Un Invoice Amount (un_inv_amt) or Un Payment Amount (un_payment_amt) will not appear in the drop down list as the contract has been fully settled. Will be autofilled by inputs in Unassigned table

    • Un Payment Amount = Contract Amount (Input in Trades table, viewable in Contract No. dropdown list)- Payment/PSL Amount (Amount column in PS Ledger table)

  • Main Contract No.: Will be autofilled by inputs in Unassigned table

  • Qty: Will be autofilled by Contract Actual Qty (if empty, will be Qty) in Trades table, once edit in Trades table, this will auto update

  • Price: Will be autofilled by Contract Actual Price in Trades table, once edit in Trades table, this will auto update

  • Company*: Entity of contract, Name of your company (can be input in Settings>Company>Company Profile page). Input is required and once done, you can then double click Contract No. from the dropdown list to select Contract No. Otherwise, you may manually input. Will be autofilled by inputs in Unassigned table

  • Bank: Name of beneficiary bank, MUST be set up in Accounting>Bank Details page before you can select the bank name. Please note that the Company, Bank and Currency must be the same as those saved in the Accounting>Bank Details page, otherwise, Bank column will be empty and cannot be selected from dropdown list. Will be autofilled by inputs in Unassigned table

  • Counterparty: Name of counterparty. Input is not required as it will be auto-filled if you select Contract No. from the dropdown list. Otherwise, you may manually input. Please note that if Counterparty and Third Party are different, Counterparty will be highlighted in green. Will be autofilled by inputs in Unassigned table

  • Third Party: If the payment is directed towards a party different from the counterparty listed, you may input the name of third party here. Please note that if Counterparty and Third Party are different, Counterparty will be highlighted in green. Will be autofilled by inputs in Unassigned table

  • Ledger Type*: Will be autofilled by inputs in Unassigned table

    • Purchase contract - Payment paid to counterparty (Paid) - Amount is positive value for purchase contract; if positive value in Amount is input, Ledger Type automatically becomes Paid

    • Sale contract - Payment received from counterparty (Received) - Amount is negative value for sale contract; if negative value in Amount is input, Ledger Type automatically becomes Received

  • DES: Description. Will be autofilled by inputs in Unassigned table

  • AMOUNT*: Payment amount (paid to counterparty or received from counterparty). The amount input here will be used to recalculate Un Payment Amount immediately, which will be reflected in the Contract No. dropdown list: Un Payment Amount = Contract Amount (Input in Trades table, viewable in Contract No. dropdown list)- Payment/PSL Amount (Amount column in PS Ledger table). Will be autofilled by inputs in Unassigned table

    • If the amount input is negative, Ledger Type will automatically become PAID. If the amount is positive, Ledger Type will automatically become RECEIVED.

    • Repeat this step until Un Payment Amount is 0 (sum of all Amount columns in PS Ledger = Contract Amount) which means that the contract has been fully paid/settled, and the contract number will not be available for selection in the Contract No. dropdown list

  • Un Payment Amount: Refers to the amount that has not been fully paid/received yet. Will be autofilled with the contract’s Contract Amount (for the first time, subsequent times will be the latest UnPayment Amount) once Contract No. is selected from drop down list by default. Once Amount column has been input in PS Ledger table, Un Payment Amount will be updated immediately in real-time to match the value in Un Payment Amt column in PS Ledger table. PSL Amount can be more than Contract Amount as some clients may pay eg 110% (Contract Amt will be shown in red but still allowed to save)

    • Un Payment Amount = Contract Amount (Input in Trades table, viewable in Contract No. dropdown list)- Payment/PSL Amount (Amount column in PS Ledger table)

CCY*: Currency of PS Ledger item, must be same as the Currency in put in Trades tab

REMARKS: Remarks

Once the necessary data is input, click on Save to save your data. Please note that once the table is saved, you will not be able to edit any data except Contract No.. To edit other data, you will need to delete the row and reinput the data.


If you add or edit in the table and switch to another page or refresh the page without saving, you will be prompted that any unsaved data will be lost.


v. Once all data (all fields highlighted in red are compulsory fields) is filled, please click on Save at the bottom left corner of the page to save the data. The saved data will be calculated and displayed in the relevant columns (PSL Amt, PSL Date, Bal Amt) in the Trades table


vi. Combination

You may choose to combine contracts together (tick multiple rows and click on Combination) to obtain the summed up Amount if the following conditions have been met.

  1. in Unassigned tab only (phy_trade_id empty) - No contract number has been assigned to the payment item yet

  2. only PSL with same THIRD PARTY, BANK, LEDGER TYPE, CCY and COMPANY are allowed to combine and sum up all AMOUNT

  3. DATE will be the latest one

 

You will be prompted to confirm that you would like to combine the trades together, as once the trades are combined, you will not be able to undo the changes, unless you use the Allocate function to split the trades

 

Once combined, the trades will be displayed in the table as single row with the Amount summed up accordingly.

 


vii. Recalculate

Recalculation will only work on trades with contract numbers (in Assigned table). In the event that calculation of any values is incorrect, you may tick the row of the trades and click on the Recalculate button to recalculate the values. When you click on Recalculate, a pop up message will appear indicating that recalculation has been completed and you may save your data.

 


viii. Allocate

You may bulk-allocate the payment item to different contracts by ticking a row in PS Ledger table and clicking on Allocate, and a pop-up page with 3 panels will appear.

1st Panel: Displays the payment item selected in PS Ledger

2nd Panel: Displays the selected contracts (in 3rd panel) or newly added rows (with no contract number) to be allocated to payment item in 1st panel

3rd Panel: Displays the available contracts (created in Trades tab) for allocation to the payment item in 1st panel

Any contracts created in Trades tab with the same Company Name, Third Party (Counterparty) and Currency as the selected payment item in PSL in 1st panel will appear in the 3rd panel for selection. You can click on the row in the 3rd panel to allocate the payment to the contracts, and the selected contract(s) will appear in the 2nd panel.

  • When the contract appears in 2nd panel, the Amount in 1st panel will be deducted from the Un Payment Amt of the contract in 3rd panel, indicating that the payment amount has been allocated to the contract. Repeat this step until the Un Payment Amount of the contract becomes 0 and the contract will be fully settled and unavailable for selection subsequently. Otherwise, the contract will remain in 3rd panel until it is fully allocated

  • For example, if the Amount in 1st panel is $100, and you select the contract in 3rd panel (Un Payment Amt is $300), it will appear in 2nd panel and the Amount will be autofilled with $100, indicating that payment of $100 has been paid/settled for the contract. Since the Un Payment Amt in the contract has not been fully allocated ($200 left), it will remain in the 3rd panel until further payment allocation has been made.

  • On the other hand, if the Un Payment Amt of the contract in 3rd panel is 0, then the contract will disappear in the 3rd panel, indicating that the contract has been fully allocated by the Amount in 1st panel. Allocated contract will thus appear in the Assigned table (if Contract No. is available; otherwise will remain in Unassigned table). If fully allocated, sum of all the Amount of the contract will be its Contract Amount and Un Payment Amt will be 0 in Assigned table.

To allocate the payment item in 1st panel into smaller values that are not available for selection in the contracts in 3rd panel, you can click on Add Row in the 2nd panel to add a new row and input the Amount, which will be deducted from the Amount in 1st panel accordingly. Once you add a new row, the new row’s fields will be autofilled with the same details as the contract (Date, Company, Bank, Third Party, Ledger Type, Des, Ccy). You can add the contract number for the newly added rows in the Unassigned table in PS Ledger. To remove the allocation of the contracts in 2nd panel, you can tick the row and click on Delete Row and the contract will return back to the 3rd panel.

 

 

1st Panel:

The first panel displays the selected payment details input in PS Ledger tab, if values are available, they will appear in the table

  • Date

  • Contract No.

  • Company

  • Bank

  • Counterparty

  • Third Party

  • Ledger Type

  • Des

  • Amount: Payment amount to be allocated to different contracts. The amount will be reduced according to the selected contracts (Un Payment Amount). If Amount becomes 0, it means that the payment item has been fully allocated

    • Initial Amount Before Allocation: Amount in 1st Panel = Amount input in PSL

    • During Allocation: Amount in 1st Panel = Initial Amount Before Allocation in 1st Panel - Sum of all Amount in 2nd Panel

  • Un Payment Amt: If the payment item has unallocated amount from previous allocation (did not fully allocate all payment amount to contracts, Un Payment Amt will be used to

  • Ccy

  • Remarks

 

 

 

2nd Panel:

To allocate contracts to the payment, you can click on the contracts in 3rd panel and the contracts will automatically appear in the 2nd panel.

  • Unpayment Amount

 

Once contracts are selected, the 2nd panel displays the contract details input in Trades tab, if values are available, they will appear in the table.

  • Date

  • Contract No.

  • Main Contract No.

  • Qty

  • Price

  • Company

  • Bank

  • Counterparty

  • Third Party

  • Ledger Type: Paid/Received

  • Des

  • Amount: Only field that needs to be input. You will be required to input the Amount column in 2nd Panel, and the Amount column in 1st Panel will be re-calculated immediately.

    • During Allocation: Amount in 1st Panel = Initial Amount Before Allocation in 1st Panel - Sum of all Amount in 2nd Panel

    • Amount in green = ?

  • Ccy

  • Remarks

 

 

3rd Panel:

 

PS ledger allocate 2nd panel amt did not change bug fixed

when add new row in 2nd panel and input amt, the amt in 1st panel does not get deducted accordingly

seems like happen for trades with no contracts in 3rd panel

 

 

 

 


Validation Note:

  • Validation - If any row in PS Ledger is linked to deleted physical trade/trade execution, an error will be raised as physical trade/trade execution cannot be deleted until its corresponding PS Ledger item is deleted

 

Once PS Ledger data has been saved successfully, the following columns for each trade in the New Physical Trade table will be reflected automatically.

  • PSL Amt: Amount column in PS Ledger table will be automatically reflected here

  • PSL Date: Date column in PS Ledger table will be automatically reflected here

  • Bal Amt: Unpayment Amt column in PS Ledger table will be automatically reflected here. If PSL Amt has not been input yet, PSL Amt will be 0 and Bal Amt will be = Contract Amt

    • Balance Amount (Unpayment Amount) = Contract Amount (can be viewed from Contract No. dropdown list) - PS Ledger Amount (sum of all values input in Amount column in the table)

  • Inv Qty: Inv Qty column in Invoice (Received and Paid) table will be automatically reflected here

  • Inv Amt: Inv Amt column in Invoice (Received and Paid) table will be automatically reflected here

  • Inv Date: Date column in Invoice table will be automatically reflected here

  • Un Inv Qty: Un Inv Qty column in Invoice (Received and Paid) table will be automatically reflected here

    • Un-Invoiced Quantity = Quantity - Invoice Quantity will be automatically reflected here

  • Un Inv Amt: Un Inv Amt column in Invoice (Received and Paid) table will be automatically reflected here

    • Un-Invoiced Amount = Trade Value - Invoice Amount will be automatically reflected here

 


Logic for PSL/Invoice:

  • any insert or update in PSL or Invoice table, will update inv_amt or payment_amt in phy_trade table

  • sign is important for purchase/sale of contract and credit/debit of payment and invoice (purchase = paid = positive sign; sale = receive = negative sign)

  • FE need to keep un_inv_amt or un_payment_amt updated if any contract is selected before saving.

  • Un payment amt should = contract AMT if payment_amt is empty, as un_payment_amt = contract_amt - payment_amt

  • contract_amt should be contract qty x price, which should be calculated in BE when selected

  • In 5 conditions FE should change the un payment in dropdown list of contract (before save):

    1: Assign contract no to PSL

    2: change the contract no (from A to B )

    3: Delete the contract no

    4: delete row with contract no

    5: change PSL amt with contract no

  • The dropdown list in Contract No. is sorted by the latest contract date(DATE in TRADES tab) at the top of the list when select contract no; the dropdown list in contract no.

  • In invoice table and PSL table, inv_amt and psl_amt in Database should be always positive

    • Ledger type is used to control whether the amt should be positive or negative; if split PSL into negative, ledger type will be RECEIVED (negative), PAID (positive).

  • 1、dropdown list, when users choose the “Assigned(已分配) ”,table will show all PSL or invoice with contract no. When users choose “Unass,igned(未分配)”, table will show all PSL or invoice without contract no.

    2、default:Unassigned,show all PSL or invoice without contract no

  • Hide MAIN CONTRACT NO. , QTY, PRICE, UNIT, PRICE UNIT, RATIO columns

  • Change chinese translation for Third party: 第三方 to 收/付款

  • Once saved, PSL and Invoice table cannot be edited except Contract No.

  • In psl, receive, issue table or window, when update amt, there is a bug due to no unit to convert, need to handle it and test update amt, qty correctly.

  • Row order issue; order by psl_id DESC; for table psl, receive and issue

  • if unpayment amt is 0, copy paste contract no should not work in ps ledger as contract no will not be available in dropdown list since already allocated finish

 

Group Function - User Access Management

Group-level(ops) personnel are not allowed to modify or delete PSL and invoicing information imported under company-level accounts. They can only assign under the contract number or split(allocate) the records.

Non-creator should only be allowed to edit following columns:

ps ledgers:

CONTRACT NO.

REMARKS

invoice:

INVOICE ID

CONTRACT NO.

logic in FE

  1. this is only apply to update manually in table and user is not creator

    1. if there is psl_id, then only allow to update columns above

    2. if there is no psl_id, it means new insert data, then all columns are allowed to edit

  2. only creator is able to delete rows manually in table (select row and press delete button)

 

 

 

 

 

for testing:

  1. delete row with contract_no

  2. unassign contract_no

  3. assign contract_no

  4. insert new row with contract_no

  5. update row with contract_no (update anything)

  6. all the above actions without contract_no

for 1 to 5 point, payment amt, invoice_amt and invoice qty should be update accordingly, to check if the number is correct

  1. Allocate enhancement-add a checkbox (Select All) on the far left of the 3rd panel

Remove the setting to keep two decimal places of qty columns in PSL & INVOICE

Remove the setting to keep two decimal places of following qty columns :

RECEIVE TABLE

INV QTY

ISSUE TAB, LOWER TABLE

INV QTY

ALLOCATE WINDOW OF PSL

3rd panel: QTY

ALLOCATE WINDOW OF RECEIVE

1st panel: INV QTY

2nd panel: INV QTY

3rd panel: QTY

inv qty will be unlimited dp, amt will be 2dp

the rest not indicated above wont change

 

 

In PSL, RECEIVE, ISSUE and allocate window of PSL & RECEIVE

once user clicked save button, if no response, make this button always show loading( user can’t click it again until there is response)

Click on fields to view the aggregated summary in PSL and INVOICE

in RECEIVE table, ISSUE (both upper and lower table), allocate window of PSL & RECEIVE(only 3rd panel), for all amt and qty related columns, add similar function; Also in PSL table

 

  1. Save validation in PSL/RECEIVE allocate window logic

save enable validation new logic

  1. in PSL window, if any of the point validate check failed, can not save

    1. in the 1st panel, if latest sign of amount is different from initial sign of amount, highlight in red

    2. in the 3rd panel, if sign of un payment amt is different from contract amt, highlight in red

  2. in PSL window, should in red but still can save (new added):

    1. in the 3rd panel, if sign of un payment amt is different from contract amt, highlight in red

  3. in RECEIVE window, if any of the point validate check failed, can not save

    1. in the 1st panel, if latest sign of amount is different from initial sign of amount, highlight in red

    2. in the 3rd panel, if sign of un inv amt is different from contract amt, highlight in red

    3. in the 1st panel or in 3rd panel

      1. if one of un inv qty and un inv amt is 0, the other is not 0, highlight in red which which is no 0

in the 1st panel, if latest sign of INV QTY is different from initial sign of INV QTY, highlight in red

Now that we have lifted the restriction on positive and negative signs, should we allow them to save when the "un payment" in the 3rd panel is displayed in red? The save validation should only apply to the 1st panel of PSL&RECEIVE and 3rd panel of RECEIVE window

 

In PSL table, contract no dropdown list:

delete the contract/ledger type filter condition

for all rows, show

  1. same company

  2. ccy == ccy

  3. un_payment_amt is not 0

 

In PSL allocate window:

delete the contract/ledger type filter condition

in the last panel, show contracts

  1. same company

  2. third party == counterparty

  3. ccy == ccy

  4. un_payment_amt is not 0

 

if un_payment_amt in 3rd panel has reverse sign compared to the amt in 1st panel,

once click contracts in 3rd panel, amt in 2nd panel would not be filled by un_payment_amt, but leave it empty

Final Calculation Logic:

  1. when we do portfolio P/L calculation, we use phy_trade actual qty (otherwise qty) and actual_price (otherwise ested_price) in phy_pricing table, which means in settlement tables controlled by risk department

  2. for contract_amt, psl, invoice, we use contract_actual_qty (qty) and contract_actual_price (provisional_price) to calculate.

    1. BE in dropdown list in psl, invoice

    2. FE un_inc_amt, un_payment_amt in psl, invoice table

    3. FE contract_amt … in phy_trade table

The right logic should be: for each trade, once they key the price and qty but not yet record PSL or INVOICE for this contract, PSL AMT, INV QTY, INV AMT should be 0 and BAL AMT , UN INV QTY , UN INV AMT should not be null.

Initial BAL AMT, UN INV QTY, UN INV AMT formulas have no change

 

 

FE issue of delete contract no before save in PSL tab

In PSL, when assign contract no, COUNTERPARTY will auto fill. If user tried to delete contract no before save, COUNTERPART should change back to blank, now it would not.

 

add more columns in 3rd panel of allocate window - PSL and RECEIVE

add these columns in 3rd panel of allocate window

PSL

INVOICE MONTH

ACTUAL PEICE FLAG

EXECUTION STATUS

STOCK DATE

WH NAME & STATUS

STOCK QTY

UNSTOCK QTY

PSL AMT

PSL DATE

INV QTY

INV AMT

UN INV QTY

UN INV AMT

REMARKS

 

tick rows and view the aggregated summary in PSL and INVOICE

in RECEIVE table, ISSUE (both upper and lower table), allocate window of PSL & RECEIVE(only 3rd panel), for all amt and qty related columns, add similar function:

 

  1. in both psl and receive allocate window

if selected row from 3rd panel, still remain in the 3rd panel (it means the selected contract un_payment_amt or un_inv_qty or un_inv_amt is not 0)

please highlight amt, inv qty cell in the row in 2nd panel. Green(Green is for amount that is not equal to contract amt)

 

For all contracts in 3rd panel (no matter PURCHASE or SALE contracts), when click or select the contract

In 2nd panel, we just create a new PSL record and fill the AMOUNT column with UN PAYMENT AMT in 3rd panel :

If UN PAYMENT AMT<0, auto PSL record whose LEDGER TYPE = RECEIVE

If UN PAYMENT AMT >0, auto a PSL record whose LEDGER TYPE = PAID

 

so please remove currently logic if sign of UN PAYMENT AMT is different from sign of PSL in the first panel, the amt will be auto empty.

this is the special case, when UN PAYMENT AMT sign is different from sign of PSL AMT in the 1st panel.

update amt in phy_trade table

update inv_amt, payment_amt, inv_qty in phy trade

when

  1. delete assigned psl rows accordingly

  2. un-assigned or assign contract to psl rows accordingly

  3. if payment_amt empty, do not save as 0, save as null

test:

  1. assign contract to psl and check phy trade table the amts are updated accordingly

  2. un-assign contract from psl and check phy trade the amts are updated accordingly

  3. delete psl and check related phy trade amts are updated accordingly.