I have an application that uses EConnect to import information into GP. When I import customers using the taUpdateCreateCustomerRcd node I want to include a credit limit.
Here is the code I am using to insert the credit limit:
customer.CRLMTTYP = 2;
customer.CRLMTAMT = 1000;
For some reason the credit limit doesnt get imported for the customer. Any ideas what I am missing for this?
For anyone else that comes across this issue I figured out my problem. When you specify a credit limit type and amount you need to include the following:
customer.CRLMTTYPSpecified = true;
customer.CRLMTAMTSpecified = true;
Same goes for credit limit percentage.
Related
So, I have a use case where I need to calculate the monthly costs of my clients Quicksight usage.
If the user has an 'Author' role the cost is fixed to 18$ per month. If the user has 'Reader' access, it costs 0.30cents for 30 minutes for the first 17 sessions and 5$ fixed rate if the usage exceeds 17 sessions.(How I calculated the number of sessions is another story).
So, say I have a visual like this:
I redacted the user names for obvious reasons. I just want to add a simple calculated field called total_cost with following code:
ifelse(role = 'Author', 18,ifelse(role = 'Reader' AND {total_sessions_per_month} >= 17, 5,ifelse(role = 'Reader' AND {total_sessions_per_month} < 17, 0.30*{total_sessions_per_month}
, 0)))
I am getting a syntax error with this code. It says, "The syntax of the calculated field expression is incorrect. Correct the syntax and choose Create again."
Also, I am not entirely sure about the logic of the code here, as the field 'total_sessions_per_month' is another aggregated field.
sumOver(sum({total_sessions}),[{user_name},role,year,month])
I don't know how it fits here, as I formed a condition with an non-aggregated field(role) and aggregated field(total_sessions_per_month).
I hope someone can help me figure this out, as I am pretty new to Quicksight and BI in general.
ifelse(role = 'Author', 18, (role = reader AND {total_sessions_per_month} >= 17), 5, (role = reader AND {total_sessions_per_month} < 17, 0.3 * total_sessions_per_month, ELSE)
Have a look at : https://docs.aws.amazon.com/quicksight/latest/user/ifelse-function.html
I have a list of football team names my_team_list = ['Bayern Munich', 'Chelsea FC', 'Manchester United', ...] and try to search for their official Facebook page to get their fan_count using the Python facebook-api. This is my code so far:
club_list = []
for team in my_team_list:
data = graph.request('/pages/search?q=' + team[0])
for i in data['data']:
likes = graph.get_object(id=i['id'], fields='id,name,fan_count,is_verified')
if likes['is_verified'] is True:
club_list.append([team[0],likes['name'],likes['fan_count'],likes['id']])
However, because my list contains over 3000 clubs, with this code I will get the following rate limit error:
GraphAPIError: (#4) Application request limit reached
How can I reduce the calls to get more than one club's page per call (e.g. batch calls?)
As the comment on the OP states, batching will not save you. You need to be actively watching the rate limiting:
"All responses to calls made to the Graph API include an X-App-Usage HTTP header. This header contains the current percentage of usage for your app. This percentage is equal to the usage shown to you in the rate limiting graphs. Use this number to dynamically balance your call load to avoid being throttled."
https://developers.facebook.com/docs/graph-api/advanced/rate-limiting#application-level-rate-limiting
On your first run through, you should save all of the valid page ids so in the future you can just query those ids instead of doing a search.
Vault is a plugin for Bukkit that is also an Economy API. It can be used to post updates to Players' money, and used as a Currency in a server.
VaultAPI is also open-sourced at Github
I'm trying to get the accounts which have the biggest amount of money, but that's not straight-forward in Vault's API.
So, what I tried to do was:
Iterating through all OfflinePlayers and comparing money values
Recovering the biggest value
Code:
double highest = 0;
OfflinePlayer topPlayer;
OfflinePlayer[] players = Bukkit.getOfflinePlayers();
for (OfflinePlayer p : players) {
double playerAmount = econ.getBalance(p); //Econ is Economy instance from Vault.
if (playerAmount > highest){
highest = playerAmount;
topPlayer = p;
}
}
I tried iterating all acounts to find the highest amount, but it lags a lot when you have too many Players.
Is there any way to find which players have the biggest amount of money?
There are a few ways you can accomplish this.
First of all, you could use Essentials' UserBalanceUpdateEvent and determine if the balance is higher than the high score in the config (in which case, you update the stored value with the new value and the UUID it belongs to).
Second, you could iterate through the OfflinePlayers, but using an Asynchronous task.
I have been integrating my application with QuickBooks using the SDK QBFC. I have invoices working successfully. The issue I have come across and am struggling to find recources for is with credits. When sending the request to create an invoice with a negative value I get this message:
"Transaction amount must be positive."
I have tried using using the quantity as a negative and rate hoping it would work out the amount as a negative but then I got this:
"You can't use negative rates on inventory items, use neg quantity instead"
So, I have come to the realization that I need to use the Refunds and Adjustments in QuickBooks and cannot find any examples to follow.
I have worked this out. Using the same structure you would to create the request for an invoice but replace:
Dim invAdd As IInvoiceAdd
Set invAdd = msgSetRq.AppendInvoiceAddRq
With:
Dim refundAdd As ICreditMemoAdd
Set refundAdd = msgSetRq.AppendCreditMemoAddRq
In test mode,When I try to make refund for my transactions via Authorize.net AIM by using only the last 4 digits of credit card , it shows the following error.
(TESTMODE) The credit card number is invalid
But strangely, when I enter the complete creditcard number(4007000000027) , the refund works perfectly fine ;
So how can I make my transactions refund by using only the last 4 digits of my credit card in test mode ?
PS: I even tried XXXXXXXX0027 as an input , but didnt work.
If you try to do a refund before the transaction is settled you will get this error. Since transactions in test mode are never settled you can't test them this way. If you want to test your code you need to use a developer account which will let you test like you are in live mode but without incurring any fees.
If you void the transaction you won't need to include those credit card numbers and it should go through. Is your x_type parameter set to Credit? Set it to VOID and take out the credit card number parameter. I have read numerous articles that say its best to Void a transaction for the lack of fees on both parties and also it goes through more often then credits.