Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
userdocs:travelwise:documents_management:invoice:package_rounding_difference [2013/11/26 04:58]
dokuwiki_sync created
userdocs:travelwise:documents_management:invoice:package_rounding_difference [2014/12/23 04:16] (current)
dokuwiki_sync
Line 1: Line 1:
-====== Invoice Package ​Rounding Difference ======+===== Invoice Package ​Calculation Flows and Settings ​=====
  
-In case there was a package with a difference ​which could not be put on any line due to rounding logics, a warning occured that the package is not balanced. And system could not do anything with it.+==== Allowed Difference ==== 
 +Allowed ​difference ​between package lines and sum of lines in the package ​after recalcualtion ​is controlled under: Tools → Company Settings → Invoicing → AllowedPackageRecalculationDifference.
  
-**The right way to avoid such situations is** to put the difference to new line with a product which has unchecked ​//​Package ​AutoPrice// ([[userdocs:​travelwise:​data_loading:​products|Read More]]).+==== Negative Profit ==== 
 +There can be the cases with a negative profit on a product inside a package and it was decided that //non package autoprice lines// (//NPAP// - a line for a product which has //'Package ​Autoprice'​// setting disabled in //Tools -> Products//) in a package should not have profit at all (i. e. 0 profit). To solve that and other requests the following is implemented:​ 
 +  
 +**Note** 
 +In case of a multicurrency //total sell price// is not converted to //local sell price// for a package line after package recalculation. But it is converted when changes total sell price manually and when the package is created.
  
-This product ​can be selected in Company Settings for such operations.+
 +//Company Settings -> Settings -> Invoicing -> ResetNonPackageAutopriceLinesInPackage//​ 
 +Enabling resets sell price to be equal to expence for all non-package autoprice lines in a package). By default the setting is disabled. 
 + 
 +II 
 +While invoicing with above option enabled, it makes sell=exp for all non-package autoprice lines when adding them to a package (either when package is created or a new line is added into it), profit is 0. 
 +BUT, before this gets done, line sell price (with or w/o VAT) must be taken into account when calculating package sell price, so the sequence of creating a new package is: 
 +  -  Add line into package. 
 +  -  Calculate package sell. 
 +  -  Reset sell to exp for all NPAP lines. 
 +  -  Apply existing logic (like copying VAT from package to inner lines). 
 +  
 +III 
 +If above option is disabled (by default) - no changes for the non-package line (like it used to be before). 
 +  
 +  
 +=== Billetkontoret A/S Flow === 
 +//​ResetNonPackageAutopriceLinesInPackage//​ - enabled. 
 +//​SuppressWarningWhenAddingNewLineForDifferenceInPackage//​ - disabled. 
 +  
 +So all 'non pap' lines are going to get 0 profit, difference comes into '​pap'​ lines. In case any difference ​can not be balanced, it appears in a new line (with a corresponding warning) or a message //'Can not balance'//​. 
 +  
 + 
 +=== JTB Stockholm Flow === 
 + 
 +//​ResetNonPackageAutopriceLinesInPackage//​ - disabled. 
 +//​SuppressWarningWhenAddingNewLineForDifferenceInPackage//​ - enabled. 
 +All product are set to non-pap. 
 +'​Balancing'​ product code is set to HF. 
 +  
 +So on balancing package there is no recalculation (since lines are non pap and they are frozen by option1). 
 +All difference goes to the new HF line, package gets balanced. 
 + 
 + 
 +==== Invoice Package Rounding Difference ==== 
 + 
 +In case there was a package with a difference which could not be put on any line due to rounding logic, a warning occured that the package was not balanced. And system could not do anything with that. 
 + 
 +**The right way to avoid such situations is** to put the difference in a new line with a product which has unchecked //Package AutoPrice// ([[userdocs:​travelwise:​data_loading:​products|Read More]]). 
 + 
 +For such purposes a product has to be selected in Company Settings ​to be applied ​for the difference each time.
  
 There used to be logics which allowed to have small (0.06) difference and such package was balanced. But currently it is disabled and all difference gets in a new line in case //​AddingProductWithDiffInPacakges//​ is enabled. If it is disabled, then the functional is switched off and works as before. There used to be logics which allowed to have small (0.06) difference and such package was balanced. But currently it is disabled and all difference gets in a new line in case //​AddingProductWithDiffInPacakges//​ is enabled. If it is disabled, then the functional is switched off and works as before.
  
-===== HOW TO CONTROL =====+=== How to control the setting ​===
  
 1. By a checkbox in //Company Settings -> Settings -> Invoicing: AddingProductWithDiffInPackages//​. 1. By a checkbox in //Company Settings -> Settings -> Invoicing: AddingProductWithDiffInPackages//​.
Line 19: Line 64:
 The selected product is going to be added for putting difference in packages after a corresponding warning. The selected product is going to be added for putting difference in packages after a corresponding warning.
  
-**NOTE**+**Note**
 It works only in case //'​AddingProductWithDiffInPacakges'//​ is enabled. It works only in case //'​AddingProductWithDiffInPacakges'//​ is enabled.
  
Line 28: Line 73:
 //In the package ... there is difference in Exp./Sell price= X.XX which can not be spread into package lines. //In the package ... there is difference in Exp./Sell price= X.XX which can not be spread into package lines.
 Would you like to add new line with the product ... to the package and put the difference on it to make the package balanced?// Would you like to add new line with the product ... to the package and put the difference on it to make the package balanced?//
-YES/NO*+Yes/No*
 ***** *****
 +
 +4. Enabling of //Company Settings -> Settings -> Invoicing: SuppressWarningWhenAddingNewLineForDifferenceInPackage//​ turns off the warning on adding new line to balance a package. Disabled by default.
 +
 Exp./Sell price Exp./Sell price
 Only '​Exp.'​ is returned in case we have difference in Exp. Only '​Exp.'​ is returned in case we have difference in Exp.
 If we have difference in Sell price - then it should show only '​Sell'​. If we have difference in Sell price - then it should show only '​Sell'​.
  
-YES: New line with the selected product for //​ProductForPuttingDifferenceInPackages//​ is added at the end of the package. It has Sell/Exp price = difference that we have. +Yes: New line with the selected product for //​ProductForPuttingDifferenceInPackages//​ is added at the end of the package. It has Sell/Exp price = difference that we have. 
-NO: Nothing happens. User makes corrections.+No: Nothing happens. User makes corrections
 + 
 +==== Discount ==== 
 +To solve the problems for the lines with discount inside the package it was decided to remove their discount. When invoice line with discount gets into a package (when new package is created or line is added to existing package) the discount from line is removed. Discounted sell price is used for package total calculation,​ discount amount and % from the line are removed.