Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Update product for The livingOS #8

Open
Kritchasorn opened this issue Sep 25, 2022 · 9 comments
Open

API Update product for The livingOS #8

Kritchasorn opened this issue Sep 25, 2022 · 9 comments
Assignees

Comments

@Kritchasorn
Copy link

Describe the bug
Found a problem in updating products API Post products When adjusting prices or product information, it will affect the chart of accounts that have already been linked. The chart of accounts always returns to default when data is Updated by API.
Please also specify affected endpoints

We will get back to you for your customer Id
Screen Shot 2565-09-25 at 21 16 04
In case
We cannot submit the updated chart of accounts because we do not have the chart of accounts code. and no API Spec to retrieve data Chart of accounts because we only use the chart of accounts on Flow Accounts.

@Nitidomechailom Nitidomechailom self-assigned this Sep 26, 2022
@Nitidomechailom
Copy link

Now we can't get chart of account on flowaccount api then you must view this on flowaccount ui as picture that's I shown you .
Screen Shot 2565-09-26 at 12 41 19

Screen Shot 2565-09-26 at 12 42 24

@Nitidomechailom
Copy link

Case adjusting prices or product information .
you must push field sellChartOfAccountCode : "number chart of account" when you update product as picture that's I shown .

{ "type": 5, "name": "Service test 00", "description": "Type service", "quantity": 1, "unitName": "บริการ", "pricePerUnit": 100, "total": 100, "sellChartOfAccountCode": "41210", "buyChartOfAccountCode": "" }

@Kritchasorn
Copy link
Author

This means that if we have to adjust the price of every product, will we have to bind a new chart of account?

@Kritchasorn
Copy link
Author

มีวิธีการทำอยู่ 2  แบบที่เห็นคือ

  1. เมื่อมีการ Update สินค้า จะต้องทำการผูกผังบัญชีใหม่
  2. เมื่อมีการ Update สินค้า จะต้อง สอบถามทางบัญชี ว่าผังบัญชีเป็นเลขอะไร และทำการระบุไปใน API
    วิธีการที่เราสร้าง Product ตาม Spec
    เราไม่มีการส่ง "sellChartOfAccountCode": "",
    และ "sellChartOfAccountCode": จะเกิดขึ้นจากบน Flow Account เท่านั้น เท่ากับว่าเราจะต้องเดินไปถามฝ่ายบัญชี
    หรือไม่ ตอนสร้าง สินค้าจะต้องทำการส่ง "sellChartOfAccountCode": ไปด้วยหรือการผูกบัญชี ตั้งแต่ต้นทาง

สิ่งที่สงสัย คือเราไม่มีการสร้างผังบัญชี แต่ให้เราส่งข้อมูลผังบัญชี ตอน Update Product มันแปลกนะคะ และ เมื่อเราไม่ได้เปลี่ยน product code ไม่ควรที่จะ Set ค่าเป็น Defult หรือป่าวค่ะ รบกวนพิจารณาเคสนี้ให้ด้วยนะคะ เพราะราคามีการ Create Update อยู่ตลอด และเป็นการทำงานต่างทีมกัน

@wickstargazer
Copy link
Member

Hello kab

I will investigate and let u know

from what I feel if u DO NOT send the field....just remove it from request payload it SHOULD work

@wickstargazer
Copy link
Member

wickstargazer commented Sep 30, 2022

@Kritchasorn could u fix this issue by the advise above?

i will test it out by monday evening na krab, i am moving the product endpoint for v3

{ "type": 5, "name": "Service test 00", "description": "Type service", "quantity": 1, "unitName": "บริการ", "pricePerUnit": 100, "total": 100 }

or

{ "type": 5, "name": "Service test 00", "description": "Type service", "quantity": 1, "unitName": "บริการ", "pricePerUnit": 100, "total": 100, "sellChartOfAccountCode": "", "buyChartOfAccountCode": "" }

@HeangTH
Copy link

HeangTH commented Oct 3, 2022

@wickstargazer. We folllow API Document (https://developers.flowaccount.com/#tag/Products/paths/~1products~1%7Bid%7D/put). We don't sent any field related to ChartOfAccount

@Nitidomechailom. According to API Document (https://developers.flowaccount.com/#tag/Products/paths/~1products~1%7Bid%7D/put), there is no "sellChartOfAccountCode" field. Why we need to add it?

@wickstargazer
Copy link
Member

Maybe we can have a better discussion in slack? @HeangTH ?

@HeangTH
Copy link

HeangTH commented Oct 3, 2022

I joined slack. See you there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants