strange behavior discountprice on invoice

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
9 years 3 months ago #209548

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- Error-message(debug-mod must be tuned on) -- : strange behavior discountprice on invoice

Hi

On the invoice (plugin) the discountprice showes a price with VAT, but the VAT that is added in the next line is the total VAT. So, when you extract the discount from the subtotal and then add the total VAT the sum of this is not correcct. This is very confusing.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 3 months ago #209558

Hi,

Does the "classical" invoice good for you ?
If so, it will be good to import some code from the HikaShop invoice into the PDF Invoice plugin, to set the footer "up to date".

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
9 years 3 months ago #209705

Hi Jerome,

How can I check that? The plugin opens automatically when I click "invoice" in the ordersystem...

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 3 months ago #209707

Hi,

Temporarily disable the plugin and then you can click on the "invoice" button of the order details page.

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
9 years 3 months ago #209813

Hi Nicolas,

Haha, I could have guessed that myself. :unsure:, it's time for a break...

Well, that's not quite the way it should behave too, but it's better than the plugin. A better way to set up the invoice would be:

productprice(s) without VAT
subtotal
couponprice without VAT
total VAT (product plus coupon)
Total

I think that would be the most consistent way to handle an invoice. As far as I know this standard invoice-layout is used in most countries.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 3 months ago #209896

Hi,

You can override the HikaShop views (and you can also override the "invoice" of the PDF plugin).
Thus you can move the different lines of the footer and change the displayed information.

Like forcing the display mode for the coupon and not base it on the setting "price with tax"

if($this->config->get('price_with_tax')){
	echo $this->currencyHelper->format($this->order->order_discount_price*-1.0,$this->order->order_currency_id);
}else{
	echo $this->currencyHelper->format(($this->order->order_discount_price-@$this->order->order_discount_tax)*-1.0,$this->order->order_currency_id);
}

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 507
  • Thank you received: 21
  • Hikashop Business
9 years 3 months ago #209971

Thanks, I changed it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.075 seconds
Powered by Kunena Forum