Giter VIP home page Giter VIP logo

Comments (10)

ithielnor avatar ithielnor commented on July 18, 2024

Can you verify with Fiddler what is the value coming from harvestapp.com? It should be "United Kingdom Pound - GBP"

from harvest.net.

aqib-git avatar aqib-git commented on July 18, 2024

I verified it with fiddler it is setting Currency field to null. When I changed Invoice currency to USD it was 0, on Euro it was 1, but for GBP, INR it is null.

from harvest.net.

ithielnor avatar ithielnor commented on July 18, 2024

Which end point are you using?

from harvest.net.

aqib-git avatar aqib-git commented on July 18, 2024

I tried ListInvoices() and Invoice() method in restclient.

from harvest.net.

ithielnor avatar ithielnor commented on July 18, 2024

Can you paste the xml that Harvest is sending back when you call Invoice(id)? (Sanitized of course)

from harvest.net.

aqib-git avatar aqib-git commented on July 18, 2024

I'm consuming json form, this is what I got from the Api

{
  "$id": "1",
  "Id": 8932659,
  "UpdatedAt": "2016-02-17T11:09:44Z",
  "CreatedAt": "2016-02-16T19:05:35Z",
  "Amount": 1742.03,
  "DueAmount": 0.0,
  "DueAt": "2016-04-02T00:00:00Z",
  "DueAtHumanFormat": 3,
  "PeriodEnd": null,
  "PeriodStart": null,
  "ClientId": 4227027,
  "Kind": 0,
  "Subject": "subject 1",
  "Currency": null,
  "IssuedAt": "2016-02-17T00:00:00Z",
  "CreatedById": null,
  "Notes": "my notes",
  "Number": "0014",
  "PurchaseOrder": "6",
  "ClientKey": "99c9c12b091afaadde574efdcda8861b328f7bca",
  "State": 3,
  "Tax": 8.0,
  "Tax2": 10.0,
  "TaxAmount": 118.1,
  "TaxAmount2": null,
  "Discount": 5.0,
  "DiscountAmount": 77.7,
  "RecurringInvoiceId": 161146,
  "EstimateId": null,
  "RetainerId": null,
  "CsvLineItems": "kind,description,quantity,unit_price,amount,taxed,taxed2,project_id\nService,Webservice,1.00,666.00,666.0,true,true,\nAPI,\"\",1.00,888.00,888.0,true,true,\n"
}

from harvest.net.

ithielnor avatar ithielnor commented on July 18, 2024

If the API is sending you "Currency": null then the Invoice.Currency value will also be null. There is nothing we can do about that. This means that the value stored in Harvest is null.

from harvest.net.

aqib-git avatar aqib-git commented on July 18, 2024

But I tried to access the harvest api using basic authentication and sended the request to this endpoint
http://subdomain.harvestapp.com/invoices/invoiceId it returned me the Currency field well.

from harvest.net.

ithielnor avatar ithielnor commented on July 18, 2024

I'm confused. You said that you were using JSON and the above object was the response. Harvest.Net does not support JSON at this time so I assumed you were pasting the exact result you got directly from harvestapp.com (which is what I was requesting).

Please paste the exact output you get from harvest (without using harvest.net).

from harvest.net.

aqib-git avatar aqib-git commented on July 18, 2024

Sorry for the late response, see the output below obtained through basic authentication

{
  "invoice": {
    "id": 8963154,
    "client_id": 4227029,
    "period_start": null,
    "period_end": null,
    "number": "0015",
    "issued_at": "2016-02-22",
    "due_at": "2016-02-22",
    "amount": 216.4,
    "currency": "Indian Rupee - INR",
    "state": "paid",
    "notes": "",
    "purchase_order": "",
    "due_amount": -783.6,
    "due_at_human_format": "custom",
    "created_at": "2016-02-22T08:05:22Z",
    "updated_at": "2016-02-24T08:20:01Z",
    "tax": 0.0,
    "tax_amount": 0.0,
    "subject": "",
    "recurring_invoice_id": null,
    "tax2": 0.0,
    "tax2_amount": 0.0,
    "client_key": "9e107c93917165ce93654ed546bb5b3f61598810",
    "estimate_id": null,
    "discount": 7.0,
    "discount_amount": 16.29,
    "retainer_id": null,
    "created_by_id": 1214811,
    "project_id": null,
    "csv_line_items": "kind,description,quantity,unit_price,amount,taxed,taxed2,project_id\nService,\"\",1.00,100.00,100.0,true,true,\nService,\"\",1.33,99.77,132.69,true,true,\n"
  }
}

the output has currency field set properly but using your rest client the currency field is null.

from harvest.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.