Hello,
is it possible to handle 2 VAT's -19% and 7%- in a simple way?
Best regards
Dirk
PHP Scripts Development » PHP Classes Support Forum » Db_cart class Support forum
Using 2 different VAT percentages
(6 posts)Great offers not only for geeks!
-
Posted 2 months ago #
-
Sorry, but I don't understand parts of the script ;-((
I changed the vat_perc in the table db_cart_example_products to 7.0 but when I put this item in the cart, the table db_cart_rows shows in vat_perc 19.0 :The value of the defined VAT_VALUE.
What van I do to get the right value, help me , please.
Best regards
DirkPosted 2 months ago # -
Hi,
you need to store the VAT for each product. Check the order row table, there is a column to safe the VAT for each order row.
I changed the vat_perc in the table db_cart_example_products to 7.0 but when I put this item in the cart, the table db_cart_rows shows in vat_perc 19.0 :The value of the defined VAT_VALUE.
this value is just a default (if no other value is defined)
Posted 2 months ago # -
you need to store the VAT for each product.
Ok, but I thought, the script read the vat_perc from the product table and safe it in the order row table. Same as the other product values.
Thank you for help
Best regards
DirkPosted 2 months ago # -
Hi,
check this method:
function handle_cart_row($prod_id, $prod_name, $quantity, $price, $replace = "no", $vat_amount = VAT_VALUE) { $check_row = $this->check_existing_row($prod_id); if ($check_row == "old") { $this->update_row($this->curr_product, $quantity, $replace); } elseif ($check_row == "new") { $this->insert_row($prod_id, $prod_name, $quantity, $price, $vat_amount); } else { $this->error = $this->messages(13); } }use for
$vat_amountwhatever value you like, I don't store the percentage because you can use the amount also exclusive the VAT.Posted 2 months ago # -
Ok, that's the point, I change it.
Thank you for help
Best regards
DirkPosted 2 months ago #
Reply
You must log in to post.