Import Customer Refund scenario and got error 'Document is out of balance' - acumatica

I try to import customer refund scenario but it got error as "Document is out of balance" like the below picture:

Do you have some applications imported along with Customer Refund?
In Acumatica you are not allowed to create Customer Refund that is not fully applied to some document.
So, if you are trying to create Customer refund without any applications(or if sum of application amounts is not equal to refund amount), you'll get this error.
So, either create document along with applications or create document On Hold(that is Hold checkbox selected).
Document having On Hold status considered as draft and can be saved unbalanced.

Related

Search payment records information in Netsuite using Suitelet

Need to get payment data from Transaction >> Payable >> Pay single vendor form and create a data file. This has been done with an eventscript (add button), a clientscript and a Suitelet by searching currentRecord data from client script to Suitelet and generated a file. However, searching Transaction record type could not get payer payment department and cost center data as I know. So any advice and recommendation from Netsuite experts on how can get these payer data from Netsuite with the existing Transaction information on the Bill Payment form, like payment check number, entity id, transaction number, etc ?
When using the N/search module the following 3 tools are invaluable for retrieving data from netsuite transactions.
Netsuite records browser (shows all of the fields, available search filters, and joins ect.)
https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_1/script/record/vendorpayment.html
Another great tool is an extension called Netsuite Field Explorer developed by Michoel Chaikin
you can also turn on field ids in your account by navigating to Home->Set preferences->General tab->Set defaults->Show internal ids
(This will show the field id when you click on the field "What is this?" link directly on the record)
between the three you should be able to get everything you need to run a search and retrieve the data you are looking for.
Depending on your needs you can either search.create (return multiple records) or search.lookupfield(return a single record)

How to modify a Customer Refund in an After Submit User Event

After a new Customer Refund record is saved (After Submit user event) I need to communicate with an external web service and then update 2 fields in the record. When this code is executed to load the Customer Refund
var o = nlapiLoadRecord("customerrefund", 1906);
This error message is returned:
INVALID_TRANS_TYP
Transaction type specified is incorrect.
I found a list of supported records in the "Chapter 60 SuiteScript Supported Records" of SuiteScript Developer & Reference Guide which says the Customer Refund is only available in a server side script.
How should I go about updating the Customer Refund record?
Without seeing more code, it looks ok. I would double check that the internalId of 1906 is correct.
Also, if you're just submitting two fields, I would use nlapiSubmitField(), this will take less governance points and be quicker for NetSuite rather than nlapiLoadRecord / nlapiSubmitRecord.
Your code looks correct, if you are updating the current record I would recommend using below code to avoid incorrect internalid:
var o = nlapiLoadRecord("customerrefund", nlapiGetRecordId());
Also, I would recommend that if you need to update the fields, consider using before submit user event script on customer refund and you can update the fields using nlapiSetFieldValue(FIELD_ID, FIELD_VALUE). No need to submit the record in case of before submit.
If your script is deployed in the customer refund record, you can also do nlapiGetRecordType().

How to get customer billing address in blCheckoutWorkflow in broadleaf?

I would like to the get customer billing address details and would like to log them in an activity class in the blCheckoutWorkflow.
I have tried the following.
Order order=context.getOrder();
Customer c=order.getCustomer();
c.getCustomerPayments().get(0).getBillingAddress();
But here the size of the list returned by getCustomerPayments() is 0. So I am getting ArrayIndexOutOfBoundsException.
Is there a way to get the billing address that is entered by the customer in the /checkout.
Kindly, reply me.
getCustomerPayments() is designed to hold saved payment information for a particular Customer and is not really applicable to the current Order. This is used when a Customer wants to save payment information for checking out next time (the 'token' property on CustomerPaymentImpl is used to look up the PCI-sensitive data from the payment gateway).
If you are using Broadleaf 3.1.0-GA+ then you should do:
Order order = context.getOrder();
Address billingAddress = order.getOrderPayments().get(0).getBillingAddress();
If you are using Broadleaf 3.0.10-GA or below you should do:
Order order = context.getOrder();
Address billingAddress = order.getPaymentInfos().get(0).getAddress();

Dynamics CRM 2011 - How to relate two different entities

I have two different custom entities. The first one (payment) I create manually using a form. When the payment is created it executes a plugin that will create one or more vouchers. The plugin creates the voucher without a problem. The problem is when I go to the payment and click on vouchers, I don't see the voucher I just created listed. If I go look at all the vouchers I can see the one I just created. There is a 1 to many relationship from payment to voucher. What do I need to do in my plugin for the entities to be related?
Thanks
Sounds like you just haven't setup the relationship back to the triggering payment when you create the voucher.
Given the 1:N relationship and since you're creating the voucher in the context of a payment plugin you can set the lookup on the voucher to the payment for which the plugin is currently executing (target).
new_voucher.new_paymentid = new EntityReference(...);
new_paymentid is the lookup attribute on voucher (obviously it'll be called something else in your case). For the EntityReference you'll need to define the EntityName and Id of the product, which you can read from the target.

Drupal event registration and attendance recording

I am building a Drupal 6 site, with event managing feature, in particular:
Selling events participation
Recording events attendances: once the event is concluded, administrator can review attendances indicating which users have really participated
I have searched a lot, already seen different similar posts and considered different possibilities before posting,
including signup module and ubercart uc_signup module, but none seem to fit my requirements.
For payment I am using Ubercart.
My strategy is the following:
Create a content-type "event", which holds all information about the event, including the date of the event, description, etc.
This is also an Ubercart product.
This is easily accomplished via CCK and Ubercart (either creating directly the product in Ubercart or creating the content-type with CCK and a product with the same machine name in Ubercart)
Create an "event participation" content-type which has a field holding a reference to event node, a field holding reference to user subscribing the event, a field for "payment status" (paid or not) , a field for "attendance status" (attended or not)
This can be easily done with CCK.
When an user want to attend an event, she creates a node of type "event partecipation":
the field referencing event should be automatically filled with the event
the field referencing the user should be automatically filled with the current user
the creation of the node should be possible only if no node of this type exists for this particular event and user.
if a node of this kind already exists for this event and user it should be deleted
The newly created node has the payment field set to "not paid" and the attendance field set to "not attended" (defaults for new node)
I think all this points can be accomplished with hook_form_alter(). Is it possible?
Once the "event participation has been created" the user is presented with a link to pay the participation.
This is done adding the referenced event to Ubercart cart and redirecting user to checkout page
I think this point can be accomplished with hook_form_alter() and Ubercart API. Is it possible?
When the user fulfills payment, an action is triggered to set the "payment status" field of the "event participation node" referencing the bought product and the buying user is set to "paid".
I think this can be achieved with Ubercart conditional actions. Is it possible?
At this point, we have the possibility to create a view showing all user participating to an event, looking at "event participations" with "payment field" equals "paid"
The event "participation nodes" are still there so, after event has occurred, administrators can set user attendances and present them in a view (probably the same view)
This is simply done with views.
What do you think, is it feasible?
I'd like to go in details of some of the above steps, but for now I am interested in discussing the overall strategy.
Thanks a lot for your attention and for any suggestion.
This seems like 90% exactly what your looking for:
http://drupaleasy.com/blogs/ultimike/2009/03/event-registration-ubercart

Resources