Is PEPPOL Envelope sender the same as EHF Billing 3.0 AccountingCustomerParty? - billing

When sending an EHF Billing 3.0 Invoice, one must supply information about the customer and the supplier.
The invoice is sent along with a Standard Business Document Header (SBDH) that specify sender and receiver of the document.
Does the sender equivalent to the AccountingCustomerParty? And the receiver to AccountingSupplierParty?
And is it necessary to query the SML/SMP for all registrants?

The PEPPOL BIS Billing 3.0 syntax binding contains information on how to understand the different parts of the invoice document.

Related

Bill Reference Number not populating in Xero API

I'm creating a bill (supplier invoice) in Xero API (C# .Net). Everything populates perfectly except for the Reference number which remains blank.
Excerpt:
var invoiceObject = new Invoice
{
Reference = "TEST123",
Contact = contact,
Date = DateTime.Now,
DueDate = DateTime.Now,
ExpectedPaymentDate = DateTime.Now,
Status = Xero.Api.Core.Model.Status.InvoiceStatus.Draft,
LineItems = lineItems,
Type = Xero.Api.Core.Model.Types.InvoiceType.AccountsPayable
};
var invoice = api.Invoices.Create(invoiceObject);
The following screenshot demonstrates the issue:
Every other field, lineitem, tax code, etc. populates perfectly.
I've tried different combinations of upper and lowercase characters, numbers, etc. but it doesn't work.
If I log in to Xero, open the Invoice and manually enter TEST123 an save the invoice, it works perfectly.
I've also tried saving the invoice, then editing it and re-saving in the API and the reference still does not populate.
How can I set the reference in the API?
Quick answer
Xero Invoice API docs indicate that you can't set the reference value for an ACCPAY invoice, but that whatever you put for the Invoice Number (which is a non-unique field on ACCPAY Invoices) will also appear in the reference field.
Explanation
I ran into this same issue. I found this comment on Xero's support forum:
https://community.xero.com/developer/discussion/40489223
... which says this:
Reference is presently slightly differently based on whether the
invoice is a sales invoice (ACCREC) or a purchase invoice/bill
(ACCPAY). For a bill the reference is presented in the InvoiceNumber
element, check our documentation on invoices here where we explain
this in more detail.
From the linked to docs
All that said, the screenshot you include in your post does have a "reference" input on it, but that's not an input for the invoice's reference value - that's an input for a possible reference value for a payment you enter against the invoice. The reference value for an invoice appears at the top next to the due date:
I have the exact same issue. I'm using Python Xero but hopefully, it is the same for Javascript.
In my case, I have to use InvoiceNumber instead of Reference for bills.

how to set currency code in square payment gateway? and what types of currency it support.?

i have integrate payment gateway in my web application on PHP and i want to use CAD or GBP for currency so how to use that currency and what types of currency support it.
I have to set as below:
$request_body2 = array("amount_money" => array (
"amount" => (int)$total_ammount,
"currency" => "USD"
));`);
You can find all of Square's supported currencies here.
In order to charge a card in a specific currency, your location must support that currency. See Square's documentation on Charge for v2 in the section for amount_money.
The value of currency must match the currency associated with the business that is charging the card.
You can also only create locations for the country with which you had registered your Square account. So if you had registered in the US, you can only create US locations and process USD on your Square account.
If you're processing payments on behalf of other Square accounts (using OAuth), then you could process the payment in the currency that matches that Square account's country.

Quick bookks sdk emaill cc

I am trying to send an email with vb and I want to send them to our customers. We have the email as our customer and the "Cc" as the customers accounting department. I can easily get the eamil but I can not get the "Cc" or other alternate contact info. I have tried query through the Icustmomqury object and get anything for the extended contact info,

Proper resource names of a REST API

Let's say we are making an invoice API. What is a more appropriate resource?
GET
paid_invoices
due_invoices
all_invoices
or
GET
invoices/all
invoices/due
invoices/paid
Additional question: If your API allows marking invoices as paid what's the proper resource?
PUT //where 3 is the id
invoices/3
or
PUT
pay_invoice/3
I would say:
GET /invoices returns all invoices;
A filter can return either paid or due invoices: GET /invoices?state=paid where state can be paid or due.
To mark an invoice as paid, you can either set the corresponding state to your resource, and then you just have to update (replace actually) it using PUT /invoices/<id>.
Alternatively, you can patch your resource: PATCH /invoices/<id>. This method requires a diff like state=paid for example.
It's just a matter of what you want to send to your API (a complete resource, or just the change to apply).
A non-REST solution could be to perform a PATCH request to /invoices/<id>/paid. It's not pure REST but it's ok.

I need a guidance which mapping strategy to use

I am writing a process for sending email notification. Currently I write the email notifications in a table with the following columns:
email_notification_id => PK
notification_id => the notification
sender_id => User or Group object
recipient_id => User or Group object
sender and recipient can be of type User or Group. Obviously at the moment I cannot have FKs for sender or recipient.
1) The first option is to use Any in the mapping and add two additional columns for the type.
2) The second option is to create 4 classes for each combination and map them using discriminator:
class1 => sender of type Group, recipient of type Group
class2 => sender of type Group, recipient of type User
class3 => sender of type User, recipient of type Group
class4 => sender of type User, recipient of type User
3) Other options?
What do you think about this?
Best Regards
If it were me and I had control over the database I would change the two columns sender_id and recipient_id to sender and recipients. These would be string fields that contain the raw email addresses you are intending to use.
This is just another way to do it. Not necessarily the best as far as database design is concerned but simple from an implementation and mapping perspective.
you could also create a EmailEntityBase (or whatever better phrasing you may find) class, from which both Group and User will inherit.
then your Notification entity would refer to EmailEntityBase sender and recipient properties.