[Skip to main content](#vessel-content)

#   sql error on vendor payment

##

- **[Dibben](/forum/user/6788-dibben "View Dibben's Profile")**
- [![Dibben's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6788-dibben "View Dibben's Profile") Topic Author
- [ Offline](/forum/user/6788-dibben)

Less More

- Posts: 377
- Thank you received: 7
-
-

12 years 5 months ago [\#159616](#159616) by [Dibben](/forum/user/6788-dibben "View Dibben's Profile")  *[sql error on vendor payment](/forum/22-market-bug-report/868887-sql-error-on-vendor-payment#159616 "Hi Jerome, i don't know if this is a bug but on the payment page for a vendor. (attached) I click onto it so i can make payment for orders that the vendor is owed. However if i tick them and select...")* was created by *[Dibben](/forum/user/6788-dibben "View Dibben's Profile")*

Hi Jerome, i don't know if this is a bug but on the payment page for a vendor. (attached) I click onto it so i can make payment for orders that the vendor is owed. However if i tick them and select manual i think that i would be generating invoice so i can mark them as paid but then i click on 'generate invoice' (I assume to generate invoice for the collective amounts i owe to the vendor) it comes up with an sql error. I can't see otherwise how i can track which orders i have paid the vendor for and which i still owe them money?

Thanks

Alex

- [ ![hdd8e047.png](/forum/attachment/17808) ](/forum/attachment/17808 "hdd8e047.png") [ ](/forum/attachment/17808?download=1 "hdd8e047.png")
- [ ![h6baffcb.png](/forum/attachment/17809) ](/forum/attachment/17809 "h6baffcb.png") [ ](/forum/attachment/17809?download=1 "h6baffcb.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzg2ODg4Ny1zcWwtZXJyb3Itb24tdmVuZG9yLXBheW1lbnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

12 years 5 months ago [\#159618](#159618) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[sql error on vendor payment](/forum/22-market-bug-report/868887-sql-error-on-vendor-payment#159618 "Hi Jerome, i don't know if this is a bug but on the payment page for a vendor. (attached) I click onto it so i can make payment for orders that the vendor is owed. However if i tick them and select...")*

Hi Alex,

Please indicate your HikaShop and HikaMarket version number.
Every time you post a bug or something, indicate this information, please !

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzg2ODg4Ny1zcWwtZXJyb3Itb24tdmVuZG9yLXBheW1lbnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Dibben](/forum/user/6788-dibben "View Dibben's Profile")**
- [![Dibben's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6788-dibben "View Dibben's Profile") Topic Author
- [ Offline](/forum/user/6788-dibben)

Less More

- Posts: 377
- Thank you received: 7
-
-

12 years 5 months ago [\#159624](#159624) by [Dibben](/forum/user/6788-dibben "View Dibben's Profile")  Replied by *[Dibben](/forum/user/6788-dibben "View Dibben's Profile")* on topic *[sql error on vendor payment](/forum/22-market-bug-report/868887-sql-error-on-vendor-payment#159624 "Hi Jerome, i don't know if this is a bug but on the payment page for a vendor. (attached) I click onto it so i can make payment for orders that the vendor is owed. However if i tick them and select...")*

Apologies

You have the latest stable version of HikaMarket Multivendor: 1.4.1
You have the latest stable version of HikaShop Business: 2.3.1

Thanks
Alex

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzg2ODg4Ny1zcWwtZXJyb3Itb24tdmVuZG9yLXBheW1lbnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

12 years 5 months ago [\#159634](#159634) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[sql error on vendor payment](/forum/22-market-bug-report/868887-sql-error-on-vendor-payment#159634 "Hi Jerome, i don't know if this is a bug but on the payment page for a vendor. (attached) I click onto it so i can make payment for orders that the vendor is owed. However if i tick them and select...")*

Hi Alex,

I reproduced your problem and I am working on some patchs.
It affect mainly two files, the class order and the class vendor.

Class vendor (function pay) Code:

$vendorPayOrderType = 'sale'; $order-&gt;history-&gt;history_notified = 1; $order-&gt;order_billing_address_id = $this-&gt;getAddressId($vendor);

By Code:

$vendorPayOrderType = 'sale'; $order-&gt;history-&gt;history_notified = 1; $order-&gt;order_billing_address_id = $this-&gt;getAddressId($vendor); if(empty($order-&gt;hikamarket)) $order-&gt;hikamarket = new stdClass(); $order-&gt;hikamarket-&gt;do_not_process = true;

Class order Code:

public function afterCreate(&amp;$order, &amp;$send_email) { if(empty($order) &#124;&#124; empty($order-&gt;order_type)) return; if($order-&gt;order_type == 'subsale') $send_email = false;

By Code:

public function afterCreate(&amp;$order, &amp;$send_email) { if(empty($order) &#124;&#124; empty($order-&gt;order_type)) return; if($order-&gt;order_type == 'subsale') $send_email = false; if(isset($order-&gt;hikamarket-&gt;do_not_process)) return;

It should fix the problem.
I have also changed some design problem but it is mainly "cosmetic".

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzg2ODg4Ny1zcWwtZXJyb3Itb24tdmVuZG9yLXBheW1lbnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Dibben](/forum/user/6788-dibben "View Dibben's Profile")**
- [![Dibben's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6788-dibben "View Dibben's Profile") Topic Author
- [ Offline](/forum/user/6788-dibben)

Less More

- Posts: 377
- Thank you received: 7
-
-

12 years 5 months ago [\#159644](#159644) by [Dibben](/forum/user/6788-dibben "View Dibben's Profile")  Replied by *[Dibben](/forum/user/6788-dibben "View Dibben's Profile")* on topic *[sql error on vendor payment](/forum/22-market-bug-report/868887-sql-error-on-vendor-payment#159644 "Hi Jerome, i don't know if this is a bug but on the payment page for a vendor. (attached) I click onto it so i can make payment for orders that the vendor is owed. However if i tick them and select...")*

Ok great, which php files should i patch or is there more to add once you have finished working on the patches?

Thanks

Alex

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzg2ODg4Ny1zcWwtZXJyb3Itb24tdmVuZG9yLXBheW1lbnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

12 years 5 months ago [\#159646](#159646) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[sql error on vendor payment](/forum/22-market-bug-report/868887-sql-error-on-vendor-payment#159646 "Hi Jerome, i don't know if this is a bug but on the payment page for a vendor. (attached) I click onto it so i can make payment for orders that the vendor is owed. However if i tick them and select...")*

Hi,

With the two modifications will be good to fix your problem.
Order class = administrator/components/com_hikamarket/classes/order.php
Vendor class = administrator/components/com_hikamarket/classes/vendor.php

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzg2ODg4Ny1zcWwtZXJyb3Itb24tdmVuZG9yLXBheW1lbnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.065 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
