can we create a final table for multiple tables? - ninjakit

Procedures
Names of existing procedures to reference .Job and SSIS information if applicable
none
Business Background
Proactive contact strategy to clients with Saving Accounts to open a Credit Card Account.
Program Objectives
Contact BOfA clients with a Saving Account to encourage them to open a Credit Card account.
Dependencies
None
Follow-up Metrics :
none
Requirements
• Audience requirements
Clients that have Saving Account but no Credit Card Account with the bank
• Execution requirements
Description of how and when the campaign should be executed.
Execute Campaign Monthly: Leads targeted to load the first Monday of the month and remain open until first Sunday of the month.
• Output/Detail fields Section
The following detail fields apply to all outbound campaigns:
Detail Field 1: DOB
Detail Field 2: Age of the Saving Account
Detail Field 3: Saving account balance
Exclusions Rules
Standard Exclusions/ Mandatory Scrubs – All Client Campaigns (Only the ones in Bold)
Select Description
DSCD Primary account holder is deceased
AML Money Laundering Alert present
NRC HH has a non-resident alien
FRGN HH has a non-US address
HZIP HH has a zip code in a FEMA disaster area
Dedupe
HH Level De-dup (when multiple accounts in the HH qualify for the same campaign:HH level
De-dupe (Primary account)
NOPN Account we do not have a phone number
Custom Exclusions
Include accounts that have more than 1000 in saving – exclude accounts that have less than or equal to 1000 in saving
Include clients that are at least 25 years old -- exclude clients that are younger than 25 years
If a client already has a Credit Card account, he/she should not be targeted -- include clients who have a saving account but not a credit card account
I was trying to build select statements and create final table,
create a merge statement and create stored proc

Related

How to get converted currency amount in Braintree?

I have multiple merchant accounts in Braintree and my settlement currency is USD. Let's say I charge a credit card 10 CAD then according to Braintree documentation the converted USD amount (lets say 7 USD) will be deposited into my account.
I want to know is there any API I can use to get the converted USD amount (i.e. 7) by passing the transaction id or something?
I don't want to go to the control panel and download the transaction-level fee report for every transaction. I need to automate the process for our internal invoicing purposes.

Accounts Receivable & Payable - should payed ones be there or not?

I am working on accounting application and have one dilemma on how to treat Account Payable & Receivable with respect to them actualy been or not payed.
For example, Company A sells Product B to Customer X. They issue an invoice, send to Customer X and at that point of time, the transaction is shown on Account Receivable with notion its for Customer X and other info (date, etc...).
The question is, what happens when Customer X actually pays for it? Should that transaction still be visible in Account Receivable or removed from it?
I am interested in it from accounting point of view.
Once a payment is applied on this invoice, Accounts Receivable should be credited and its balance for this customer should be 0

Import bills with taxes as line items when picking system generated GST/PST payable accounts

I'm working on integrating our app with QBO, and stuck with a problem that stops bills from being imported into QBO with taxes as line items.
Same as what I previously did with QB desktop version, I added taxes as line items for bills and picked system generated GST/PST accounts on the line. When I imported the bills, I got errors like "You have either selected a tax liability account on a transaction where it's not allowed, or haven't specified a tax rate along with it.". I'm pretty sure the tax items the accounts associated with had rate set up already.
The same error happened when I tried to do the same thing from QBO web interface. Bills import only worked when I picked GST/PST accounts I created ourselves.
Now I'm stuck and wondering if it's possible to import taxes as bill line items with system generated GST/PST accounts, and how? If it's impossible to do it that way, does it mean I would have to use tax code and tax rate to populate taxes?
UPDATE
I solved the problem myself with some help from an intuit relations developer. Please see the answer I posted below.
So I created a support ticket at Intuit Developer, and one of their developer relations engineers responded me with the following message:
The PST/GST/HST Payable accounts are used internally by QBO to track sales tax collected and paid. You will need to use self-created expense accounts to further track these line items when creating a Bill.
I followed his suggestion and created a couple of sub-accounts under those internal tax tracking accounts that were generated by Intuit, and tried syncing bills again through QBO v3 API. It worked like a charm :)
This is for global-
Assigning flat tax item in lines can be done if the tax percent on this tax line is marked to an existing tax code->can be a zero percent too.
Suppose you want to import/create a flat tax item of $2, then you need create a taxcode of 0% percent in your company and assign it to this tax item line.
For global companies it is mandatory to assign a GST/PST tax code even though it is 0%.
Try this from UI first.

Split/Deferred payments through apple pay

On the getting started page for Apple Pay, it says that Apple Pay supports "partial shipments." How is this implemented in practice? I know how to get a token from a successful PKPayment. Once I get that token, how do I use it to implement multiple sub-order payments through my payment gateway?
For example, say the user validates a total $100 purchase through Apple Pay of two separate suborder shipments ($40 and $60 each) and I now have an associated token for the $100 order. Because of restrictions on some networks, we can't capture each payment until the associated item has been shipped, and they ship at different times.
Do I have the ability to authorize and capture payments of any amounts using that token?
What is the best approach to authorizing and capturing those sub orders?
Do I auth for the total ($100) and then auth for each sub total ($40, $60) at shipment and then capture for each sub total? If so, then I will be potentially authorizing more than the necessary total ($200), and that doesn't seem right. Is it valid to just skip auth for the total, auth for each sub total, and then capture the sub totals as they ship?
You can't capture an authorization more than once. For stripe you would need to save the token to a customer, and charge the customer for each shipment separately. This isn't only the best way it is the only way to do it.
Once you have a token and attach it to the customer object in stripe, you have the ability to charge it at any time & any amount up until the expiration date or if they remove the card from their apple pay account, like you would any other card regardless of the initial authorization.
The rest of your questions will vary by opinion as there are different ways of doing it, but here is how I would charge this type of order. I think this method benefits both the business and the customer, in addition to keeping stripe/apple happy. This isn't apple pay specific, I would treat most orders with these requirements the same. Also keep in mind apple pay supports it, but it is not required. You can collect all up front regardless of shipment dates.
Generate token from PKPayment for $100
Create customer(if needed) & add token to customer
Create charge against customer using that card for $100 without
capture
Within 7 days assess expected shipping dates.
Once assessment is complete immediately capture only the amount
expected to ship within a week on the initial charge. In your
example this is where I would capture $40 for the first charge. If
nothing is expected to be captured issue a complete refund.
Any shipments beyond the 7 days, create individual charges for the
shipments using the customer object, not the token. Again in your example this is when the $60 shipment goes
out charge that here.
As long as the second shipment charge doesn't happen to go out earlier than the 7 days this would prevent any authorizations overlapping resulting in holds of more than the initial amount at any given moment. I would treat almost any transaction like this apple pay or not.

Reserve amount that will fall back at a specific time if not used

I'm developing an app in Ruby on Rails where companies buy advertising campaigns. First they buy credits to their account on my site, then they buy the campaigns with the credits. The thing is the campaign is payed per view/click. A company reserves a budget of credits for each campaign and these reserved credits can't be used to buy other campaigns with. When a campaign ends and not all credits are used they will be un-reserved and available to buy more campaigns for.
How do I structure the models in the database and how to move/reserve/un-reserve the credits in order to periodically check for any credits that should be un-reserved in a background process?
Have a client/campaigns relationship. Each client has a number of credits. Each client campaign can withdraw credits from the client. As a campaign is viewed/clicked it withdraws credit from the client campaign.
A process periodically checks for lapsed campaigns. When it finds one, any remaining credits are deposited back to the client's main account.
All the money is kept in the company's account all the time. The goal is then to dynamically calculate how much of the funds that are reserved and how much that are not. This can be done if every campaign have a reserved amount attribute and a used amount attribute. When a user clicks on the campaign I withdraw money from the companies account and add them to the campaigns used account.

Resources