Vendor paid directly wrong Invoice for customer
10 years 9 months ago - 10 years 9 months ago #229283
by filiar
Replied by filiar on topic Vendor paid directly wrong Invoice for customer
Hi, Jerome.
I really don't want to imagine the whole bunch of topics you go through every day. So I will do my best to be clear enough.
After implementin the two patches and testing:
1. Extra Invoice issue - still not fixed by the patch
2. Wrong Invoice number - FIXED (by the last code change)
About the extra Invoice number patch what I did: I replaced the code bellow in Admin/HM/order.php
Test Result: Generating of invoice for suborder in HM still leads to generating of Invoice Number in HS.
HM Configuration:
- One Vendor
- Vendor paid directly
The process:
1. Customer buys directly from Vendor (he receives money, not we)
2. Order in HS and suborder in HM are generated
3. Changing the suborder status in HM to "shipped" leads to:
- Generating suborder Invoice in HM - That's OK
- Generating of main order Invoice - That is Not OK (as we don't sell here)
I hope it is well structured this time.
Regards!
I really don't want to imagine the whole bunch of topics you go through every day. So I will do my best to be clear enough.
After implementin the two patches and testing:
1. Extra Invoice issue - still not fixed by the patch
2. Wrong Invoice number - FIXED (by the last code change)
About the extra Invoice number patch what I did: I replaced the code bellow in Admin/HM/order.php
Jerome wrote: You have to modify HikaShop to not generate the invoice id when it already have an invoice number.
ReplacingByCode:if(!empty($order->order_status) && empty($order->order_invoice_id) && empty($order->old->order_invoice_id) && $order_type == 'sale') {Then, you can see to copy the "order_invoice_number" and "order_invoice_created" from the HikaMarket subsale into the HikaShop sale (I don't have yet the code for HikaMarket ; I'll need more time for that).Code:$already_invoice_number = ((!empty($order->order_invoice_number) && !empty($order->order_invoice_created)) || (!empty($order->old->order_invoice_number) && !empty($order->old->order_invoice_created))); if(!empty($order->order_status) && empty($order->order_invoice_id) && empty($order->old->order_invoice_id) && $order_type == 'sale' && !$already_invoice_number) {
Only in that case, you can stop HikaShop to generate invoice number for all "sales".
Test Result: Generating of invoice for suborder in HM still leads to generating of Invoice Number in HS.
HM Configuration:
- One Vendor
- Vendor paid directly
The process:
1. Customer buys directly from Vendor (he receives money, not we)
2. Order in HS and suborder in HM are generated
3. Changing the suborder status in HM to "shipped" leads to:
- Generating suborder Invoice in HM - That's OK
- Generating of main order Invoice - That is Not OK (as we don't sell here)
I hope it is well structured this time.
Regards!
Last edit: 10 years 9 months ago by filiar.
Please Log in or Create an account to join the conversation.
10 years 9 months ago #229295
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Vendor paid directly wrong Invoice for customer
Hi,
I guess that you missed one part of my message :
Which also mean that I'm working on it and that I hope that it will be include in the next release.
Regards,
I guess that you missed one part of my message :
That message indicates what you have to do to fix the issue and I also add that I cannot provide any code for the moment.Then, you can see to copy the "order_invoice_number" and "order_invoice_created" from the HikaMarket subsale into the HikaShop sale (I don't have yet the code for HikaMarket ; I'll need more time for that).
Which also mean that I'm working on it and that I hope that it will be include in the next release.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: filiar
Please Log in or Create an account to join the conversation.
10 years 9 months ago #229338
by filiar
Replied by filiar on topic Vendor paid directly wrong Invoice for customer
Hi, Jerome.
I really missed that. I thought it was for the other issue.
Thank you again!
I really missed that. I thought it was for the other issue.
Thank you again!
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.062 seconds