Difference between revisions of "M4 Customer Invoices"
Line 87: | Line 87: | ||
UPDATE conflines SET value = 'B13' WHERE name = 'Cell_m2_invoice_lines_destination'; | UPDATE conflines SET value = 'B13' WHERE name = 'Cell_m2_invoice_lines_destination'; | ||
UPDATE conflines SET value = 'F13' WHERE name = 'Cell_m2_invoice_lines_name'; | UPDATE conflines SET value = 'F13' WHERE name = 'Cell_m2_invoice_lines_name'; | ||
UPDATE conflines SET value = 'I13' WHERE name = 'Cell_m2_invoice_lines_calls'; | UPDATE conflines SET value = 'I13' WHERE name = 'Cell_m2_invoice_lines_calls'; | ||
UPDATE conflines SET value = 'H13' WHERE name = 'Cell_m2_invoice_lines_nice_total_time'; | UPDATE conflines SET value = 'H13' WHERE name = 'Cell_m2_invoice_lines_nice_total_time'; | ||
Line 101: | Line 100: | ||
'''NOTE''' GUI should be restarted after made changes! | '''NOTE''' GUI should be restarted after made changes! | ||
Cell_m2_invoice_number - Number of Invoice <br> | |||
Cell_m2_invoice_issue_date - Issue Date <br> | |||
Cell_m2_invoice_period_start - Period Start Date <br> | |||
Cell_m2_invoice_period_end - Period End Date <br> | |||
Cell_m2_invoice_client_name - Client full Name (First Name and Last Name), if there is no First or Last name in database, username will be used.<br> | |||
Cell_m2_invoice_due_date - Due Date, it is End Time plus Grace Time (from User Edit, Invoices block) <br> | |||
Cell_m2_invoice_client_details1 - Address <br> | Cell_m2_invoice_client_details1 - Address <br> | ||
Cell_m2_invoice_client_details2 - City <br> | Cell_m2_invoice_client_details2 - City <br> | ||
Line 108: | Line 112: | ||
Cell_m2_invoice_client_details5 - Country <br> | Cell_m2_invoice_client_details5 - Country <br> | ||
Cell_m2_invoice_client_details6 - Phone <br> | Cell_m2_invoice_client_details6 - Phone <br> | ||
Cell_m2_invoice_lines_destination - DestinationPrefix <br> | |||
Cell_m2_invoice_lines_name - Destination Name <br> | |||
Cell_m2_invoice_lines_calls - Calls amount to particular Destiantion <br> | |||
Cell_m2_invoice_lines_nice_total_time - Duration to particular Destiantion <br> | |||
Cell_m2_invoice_lines_nice_price - Price of Calls to particular Destiantion <br> | |||
Cell_m2_invoice_lines_destination_number - Number for numeration of Destinations, each line will take second number (1,2,3,4...) <br> | |||
Cell_m2_invoice_nice_total_amount - Total Price of Invoice <br> | |||
Cell_m2_invoice_nice_total_amount_with_tax - Total Price of Invoice with applied TAX <br> | |||
Cell_m2_invoice_exchange_rate - Applied Exchange Rate <br> | |||
Cell_m2_invoice_comment - Comment <br> | |||
Cell_m2_invoice_timezone - City name which Time Zone was used <br> |
Revision as of 11:31, 17 September 2014
Description
M2 Customer Invoice is dedicated for final User of M2, who have to pay for made Calls. Admin can see and manage them in ACCOUNTING –> Customer Invoices, User can reach list of his Invoices and check them from main menu.
Despite your settings all values in Invoices are rounded into two digits after comma.
Invoices List
Invoices can be viewed, created (WIP) or exported to XLSX file in ACCOUNTING –> Customer Invoices. In the main window, you can see list of all the Invoices.
All Prices are displayed in particular Invoice Currency. That means that in each line of Invoice Price and Price with TAX will be shown in currency which is written in Currency column. The Currency column tells which currency Invoice was generated with. Also the exchange rate at the invoice generation moment is saved in the database so it may differ from the up to date exchange rate.
Total Price and Price with TAX are calculated into viewing Currency, which you can choose in upper corner of page. In Total price calculation there are used saved exchange Rate of each Invoice.
Example
Default system Currency is USD
Invoice A is generated on price = 100 in currency EUR with exchange rate 0.5
Invoice B is generated on price = 100 in currency DZD with exchange rate 0.25
Invoice C is generated on price = 100 in currency ALL with exchange rate 0.75
But now exchange rate are different: EUR - 0.75, DZD - 0.5 and ALL - 1.0.
If you want to see Total price(sum of these 3 Invoices) in EUR. For Invoice B and C will be set exchange rate of today, but for invoice A exchange rate will be from that day when invoice was generated (0.5).
Same calculations with other currencies
If you want to see Total price in DZD. For Invoice A and C will be set exchange rate of today, but for invoice B exchange rate will be from that day when invoice was generated (0.25).
If you want to see Total price in ALL. For Invoice A and B will be set exchange rate of today, but for invoice C exchange rate will be from that day when invoice was generated (0.75).
Total price will be 733.3333 USD, or 500 EUR, or 266.6667 DZD, or 700 ALL
Invoice Edit
Invoice edit is accessed from invoices list.
Here you are able to see some information of the user and Invoice displayed and also some details of the Invoice can be edited.
Price and Price with TAX are displayed in a currency the invoice was generated with. It will not be changed according to system settings.
The Exchange rate at the invoice generation moment is also saved in the database and displayed in Invoice Edit page.
Period Start and Period End dates are not affected by time zones: only Issue Date, Date Due and Status changed at changes according to the time zone of the system.
Also you are able to refresh Client Details and regenerate xlsx file by pressing RECALCULATE in particular Invoice edit.
Invoice Details
You can find this page by clicking Invoice details link in the Invoice Edit page.
In the Invoice Lines page there is information about destinations, rates assigned to those destinations, calls made to the destinations, total time per destination and price for all the calls made to the specific destination.
This page can be accessed from Invoice edit page.
In this page you can search by destination prefix. For example: enter 35567 and Albania mobile destination will be displayed.
Search can also be made with wildcard %. If you enter 35%, %67, 3%7 or %56%, Albania mobile will also be displayed.
User Invoices
Invoices can be viewed by Users and exported in XLSX format
By pressing on DETAILS User will be redirected to Invoice Details page
XLSX Invoices
XLSX file to export an Invoice is made from your own XLSX format template and information from Invoices main window.
Template have to be called default.xlsx and placed in /home/m2/public/invoice_templates folder. One template already exist, you need to change that one with yours. Template you can prepare as you wish, you can fill it with information of company, draw tables with column names, define information taken from Invoice main window and so on.
How and what information is displayed can be set in database by specific settings. For example:
UPDATE conflines SET value = 'G2' WHERE name = 'Cell_m2_invoice_number'; UPDATE conflines SET value = 'G3' WHERE name = 'Cell_m2_invoice_issue_date'; UPDATE conflines SET value = 'A7' WHERE name = 'Cell_m2_invoice_period_start'; UPDATE conflines SET value = 'D7' WHERE name = 'Cell_m2_invoice_period_end'; UPDATE conflines SET value = 'A2' WHERE name = 'Cell_m2_invoice_client_name'; UPDATE conflines SET value = 'G4' WHERE name = 'Cell_m2_invoice_due_date'; UPDATE conflines SET value = 'A3' WHERE name = 'Cell_m2_invoice_client_details1'; UPDATE conflines SET value = 'B3' WHERE name = 'Cell_m2_invoice_client_details2'; UPDATE conflines SET value = 'C3' WHERE name = 'Cell_m2_invoice_client_details3'; UPDATE conflines SET value = 'A4' WHERE name = 'Cell_m2_invoice_client_details4'; UPDATE conflines SET value = 'B4' WHERE name = 'Cell_m2_invoice_client_details5'; UPDATE conflines SET value = 'A5' WHERE name = 'Cell_m2_invoice_client_details6'; UPDATE conflines SET value = 'B13' WHERE name = 'Cell_m2_invoice_lines_destination'; UPDATE conflines SET value = 'F13' WHERE name = 'Cell_m2_invoice_lines_name'; UPDATE conflines SET value = 'I13' WHERE name = 'Cell_m2_invoice_lines_calls'; UPDATE conflines SET value = 'H13' WHERE name = 'Cell_m2_invoice_lines_nice_total_time'; UPDATE conflines SET value = 'J13' WHERE name = 'Cell_m2_invoice_lines_nice_price'; UPDATE conflines SET value = 'A13' WHERE name = 'Cell_m2_invoice_lines_destination_number'; UPDATE conflines SET value = 'E25' WHERE name = 'Cell_m2_invoice_nice_total_amount'; UPDATE conflines SET value = 'E26' WHERE name = 'Cell_m2_invoice_nice_total_amount_with_tax'; UPDATE conflines SET value = 'G25' WHERE name = 'Cell_m2_invoice_exchange_rate'; UPDATE conflines SET value = 'D27' WHERE name = 'Cell_m2_invoice_comment'; UPDATE conflines SET value = 'G7' WHERE name = 'Cell_m2_invoice_timezone';
NOTE value is an address of cell and name defines what information to show.
NOTE GUI should be restarted after made changes!
Cell_m2_invoice_number - Number of Invoice
Cell_m2_invoice_issue_date - Issue Date
Cell_m2_invoice_period_start - Period Start Date
Cell_m2_invoice_period_end - Period End Date
Cell_m2_invoice_client_name - Client full Name (First Name and Last Name), if there is no First or Last name in database, username will be used.
Cell_m2_invoice_due_date - Due Date, it is End Time plus Grace Time (from User Edit, Invoices block)
Cell_m2_invoice_client_details1 - Address
Cell_m2_invoice_client_details2 - City
Cell_m2_invoice_client_details3 - Postcode/ZIP
Cell_m2_invoice_client_details4 - State
Cell_m2_invoice_client_details5 - Country
Cell_m2_invoice_client_details6 - Phone
Cell_m2_invoice_lines_destination - DestinationPrefix
Cell_m2_invoice_lines_name - Destination Name
Cell_m2_invoice_lines_calls - Calls amount to particular Destiantion
Cell_m2_invoice_lines_nice_total_time - Duration to particular Destiantion
Cell_m2_invoice_lines_nice_price - Price of Calls to particular Destiantion
Cell_m2_invoice_lines_destination_number - Number for numeration of Destinations, each line will take second number (1,2,3,4...)
Cell_m2_invoice_nice_total_amount - Total Price of Invoice
Cell_m2_invoice_nice_total_amount_with_tax - Total Price of Invoice with applied TAX
Cell_m2_invoice_exchange_rate - Applied Exchange Rate
Cell_m2_invoice_comment - Comment
Cell_m2_invoice_timezone - City name which Time Zone was used