sflagp / QBXML-Object-Models

Quickbooks C# object models to generate QBXML for Desktop and Online Editions
MIT License
6 stars 0 forks source link

Terms Models are missing #12

Open rashi7863 opened 2 months ago

rashi7863 commented 2 months ago

Hello Greg, How are you friend?

I'm working on Terms for the Customers, Sales Orders and Invoices. This is separate entity which is linked with above ones. https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/termsquery

Found that terms models are not available, including, Query, Rs models etc.

rashi7863 commented 2 months ago

Hello Greg, Are you there?

sflagp commented 2 months ago

Hello Rashi,

So for not responding earlier. I was in Africa for 10 days in areas that did not have internet coverage and still trying to get caught up.

I will look at this tonight and see if I can get this resolved for you. On another note, my need for work with Quickbooks has diminished this year. Do you want me to add you to the repo for the project so that you can add/update code yourself? The code is several years old so could use A LOT of reorganization to meet best standards. 😀

Let me know if you are interested in that.

rashi7863 commented 2 months ago

Hello Greg, sure you can add me as well. For now, I would prefer if you have time for this request. I will start contribution for the upcoming ones.

sflagp commented 2 months ago

Hello Rashi,

I am looking into this now. I see that the query requests do not have the Terms field. But I do see that I have Terms for the following: InvoiceAddRq InvoiceModRq SalesOrderAddRq SalesOrderModRq CustomerAddRq CustomerModRq

I also see that the results view does have a Terms field but the XML deserializer is looking for TermsRef. Do you have a sample XML result so that I can look at some more.

Can you also verify that the Add/Mod requests do not have a Terms field?

Thanks

sflagp commented 2 months ago

Here is an updated beta version with the Terms added to the query requests for Customer, Invoice and SalesOrder. Let me know if this works for the query requests.

QbModels.1.2.15-beta01.zip

Thanks

rashi7863 commented 2 months ago

https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/termsquery

Terms is a totally separate entity, Salesorders, customers, and invoice has only reference to that.

The rest of the details will be saved separately.

rashi7863 commented 2 months ago

So Terms is a totally separate table and has its own details.

Their link is being returned in Customers etc, that is good.

But I can't fetch the details of the term.

rashi7863 commented 2 months ago

Basically ignore customers, invoices etc

Assume We have this API: https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/termsquery

and we want to sync data

sflagp commented 2 months ago

Ahhhhh, that makes sense. I see what you're saying. I will work on it tonight and send you another beta version to test.

Thanks

rashi7863 commented 2 months ago

`<?xml version="1.0" ?>

80000001-1699539765 2023-11-09T19:22:45+05:00 2023-11-09T19:22:45+05:00 1699539765 1% 10 Net 30 true 30 10 1.00 8000000A-1703023580 2023-12-20T03:06:20+05:00 2023-12-20T03:13:22+05:00 1703024002 1% 10 Net 45 true 45 10 1.00 80000016-1705431797 2024-01-17T00:03:17+05:00 2024-01-17T00:03:17+05:00 1705431797 1%90 Net 91 true 91 90 1.00 80000002-1699539765 2023-11-09T19:22:45+05:00 2023-11-09T19:22:45+05:00 1699539765 2% 10 Net 30 true 30 10 2.00 8000000B-1703023655 2023-12-20T03:07:35+05:00 2023-12-20T03:13:35+05:00 1703024015 2% 15 Net 30 true 30 30 2.00 8000000F-1703024693 2023-12-20T03:24:53+05:00 2023-12-20T03:24:53+05:00 1703024693 2% 20 Net 60 true 60 20 2.00 8000000D-1703024330 2023-12-20T03:18:50+05:00 2023-12-20T03:18:50+05:00 1703024330 2% 30 Net 45 true 45 30 2.00 80000011-1703802937 2023-12-29T03:35:37+05:00 2023-12-29T03:35:37+05:00 1703802937 2% 30 Net 60 true 60 30 2.00 80000013-1704737156 2024-01-08T23:05:56+05:00 2024-01-08T23:05:56+05:00 1704737156 2% 60 Net 61 true 61 60 2.00 80000014-1704737247 2024-01-08T23:07:27+05:00 2024-01-08T23:07:27+05:00 1704737247 2% 90 Net 91 true 91 90 2.00 80000012-1704318071 2024-01-04T02:41:11+05:00 2024-01-04T02:41:11+05:00 1704318071 2% Payment with order true 0 0 2.00 80000003-1699539765 2023-11-09T19:22:45+05:00 2023-11-09T19:22:45+05:00 1699539765 Consignment true 90 0 0.00 80000008-1703023482 2023-12-20T03:04:42+05:00 2023-12-20T03:04:42+05:00 1703023482 Credit Card true 0 0 0.00 80000004-1699539765 2023-11-09T19:22:45+05:00 2023-11-09T19:22:45+05:00 1699539765 Due on receipt true 0 0 0.00 80000010-1703714055 2023-12-28T02:54:15+05:00 2023-12-29T00:34:47+05:00 1703792087 Net 10 true 10 0 0.00 80000005-1699539765 2023-11-09T19:22:45+05:00 2023-11-09T19:22:45+05:00 1699539765 Net 15 true 15 0 0.00 80000015-1704837088 2024-01-10T02:51:28+05:00 2024-01-10T02:51:28+05:00 1704837088 Net 20 true 20 0 0.00 80000006-1699539765 2023-11-09T19:22:45+05:00 2023-11-09T19:22:45+05:00 1699539765 Net 30 true 30 0 0.00 8000000E-1703024386 2023-12-20T03:19:46+05:00 2023-12-20T03:19:46+05:00 1703024386 Net 45 true 45 0 0.00 80000007-1699539765 2023-11-09T19:22:45+05:00 2023-11-09T19:22:45+05:00 1699539765 Net 60 true 60 0 0.00 8000000C-1703023784 2023-12-20T03:09:44+05:00 2023-12-20T03:09:44+05:00 1703023784 Net 75 true 75 0 0.00 80000009-1703023545 2023-12-20T03:05:45+05:00 2023-12-20T03:05:45+05:00 1703023545 Prepay true 0 0 0.00 80000017-1705530553 2024-01-18T03:29:13+05:00 2024-01-18T03:29:13+05:00 1705530553 15th true 15 5 10 0.00 80000018-1706029779 2024-01-23T22:09:39+05:00 2024-01-23T22:09:39+05:00 1706029779 1st true 1 5 10 0.00 `
rashi7863 commented 2 months ago

Above is the xml that came in response. That contain two type of objects. DateDrivenTermsRet and StandardTermsRet

sflagp commented 2 months ago

Hello Rashi,

Thanks for including the XML. That saved us a lot of time going back and forth. The results from the QBXML is in a slightly different format than the rest of the objects. I had to override my custom ReadXML to read the data.

I added a TermsQueryRq model. It should return an XML that can be converted to TermsRs. The TermsRs model will contain 2 lists. One for StandardTerms and one for DateDrivenTerms. It also has 2 properties TotalStandardTerms and TotalDateDrivenTerms.

Please try this new beta version and let me know if anything does not work.

QbModels.1.2.15-beta02.zip

Thanks

rashi7863 commented 2 months ago

Great. Thanks Greg, Thats what I was looking for. Great help <3. I will test will let you if something fails.

sflagp commented 2 months ago

I saw that there was a StandardTermsAdd and DateDrivenTermsAdd requests. I added those models to this beta 3 version. I know you didn't request this but it's here if you want to test that feature.

QbModels.1.2.15-beta03.zip

rashi7863 commented 2 months ago

Yes for now add etc wasn't need. Well thank you for that. so nice of you buddy <3