// // Source 王: https://www.asia-home.com/wiki/taxcss.php // // // fnc001: get alcohol social security tax price: // // lTaxesFactorRef: tax reference // dVolume: volume in l // dFract: volumic fraction // function bizGetPriceAlcoholTaxCss(lTaxesFactorRef, dVolume, dFract) { // // global variables: // // // local variables: // var dUnitPrice; // // function body: // // // Not Taxed: // if (lTaxesFactorRef == 0) { return 0; } // // get per litre Taxes according to lTaxesFactorRef: // switch(lTaxesFactorRef) { // // 1. Full rate: Spirits, Liquors: > 18% Vol.: // 599.31€/hlap: // case 1: dUnitPrice = 5.9931 * dFract; break; // // 2. Mild Alcohol: Porto, Vins Doux Naturels, Pineau, le Floc: // 50.6€/hl Raw Alcohol: // case 2: dUnitPrice = 0.506; break; // // 3. VDN et VDL TO AOP: // 20.26€/hl Raw Alcohol: // case 3: dUnitPrice = 0.2026; break; // // 4. Beers > 18% = 2 since 2021: // 50.6€/hl Raw Alcohol: // case 4: dUnitPrice = 0.506; break; // // 5. Rums consumed on DOM: > 18% Vol.: // 482€/hlap: // case 5: dUnitPrice = 4.82 * dFract; break; // // Other Alcohol: 0 Taxes: // default: dUnitPrice = 0; } // // set function value: // return Math.round(100*dVolume*dUnitPrice)/100; // // exit the function: // }