Vendor Bill vs Vendor Credit / Ipp C# - intuit-partner-platform

Is there a way using the IPP (in c#) to differentiate between a Bill and a Vendor Credit? right now when I iterate through all the lines on a Bill Payment (A Check in this case) to show what bills are being paid Vendor Credits show up but they do not look any different from a bill (Amounts are positive, there is no Bill type etc).
Intuit.Ipp.Data.Qbo.BillPaymentQuery qbBillPaymentQuery = new BillPaymentQuery();
qbBillPaymentQuery.DocNumber = "143766";
List<Intuit.Ipp.Data.Qbo.BillPayment> qboBP = qbBillPaymentQuery.ExecuteQuery<Intuit.Ipp.Data.Qbo.BillPayment>(context).ToList<Intuit.Ipp.Data.Qbo.BillPayment>();
foreach (BillPayment b in qboBP)
{
Response.Write("Bill Payment Amount: " + b.Header.TotalAmt + "<BR>");
foreach (BillPaymentLine x in b.Line)
{
Intuit.Ipp.Data.Qbo.BillQuery qbBillQuery = new BillQuery();
qbBillQuery.ResultsPerPage = 1;
//qbBillQuery.PageNumber = 1;
qbBillQuery.TxnId = x.TxnId;
//qbBillQuery.SpecifyOperatorOption(FilterProperty.DocNumber, FilterOperatorType.EQUALS);
DataServices dataServices = new DataServices(context);
Bill b2 = new Bill();
b2.Id = x.TxnId;
Bill b3 = dataServices.FindById(b2);
Response.Write(b3.Header.DocNumber + " - " + x.Amount + "<BR>");
}
}

In QBO, VendorCredit is not fully supported for production use. It is available as part of a beta release.
Ref Doc - https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v2/0400_quickbooks_online/0500_supported_entities_and_operations

You are right. I was able to replicate your issue. The vendor credit objects are also retrieved as bill objects, which should not be happening.
See sample xml, the first one is a bill, last 3 lines are credit memo.
There is really no differentiation between them. Also, the vendor credit amounts are incorrect for me
However, this is currently in beta stage for Vendor credits and cannot report this issue until they are production.

Related

PayPal PayFlow Pro - Credit Card Validation : BILLTOZIP / AVSZIP

I am using Paypal / Payflow Pro's Authorization Transaction (TRXTYPE=A) to validate credit card information. I am passing 0.00 as the AMT.
This works fine and can filter out wrong account number, expiration date as well as wrong CVV2 code by checking CVV2MATCH = X in the return string.
However, there is a problem with BILLTOZIP validation. Return value is always AVSZIP = Y even if I entered the wrong ZIP.
What's weird is... The CC used for this transaction is from US. I used a CC from Philippines and wrong ZIP was being recognized.
Request:
USER=XXXXXX&VENDOR=XXXXXXXX&PARTNER=PayPal&PWD=XXXX&TRXTYPE=A&TENDER=C&ACCT=4xxxx&EXPDATE=xxxx&CVV2=xxx&AMT=0&INVNUM=521aa62355f5eb5515eca3777e1f8b78&PONUM=PFDCCTEST&COMMENT1=Test Comment 1&COMMENT2=Test Comment2&VERBOSITY=HIGH&BILLTOFIRSTNAME=Frank
&BILLTOLASTNAME=Enstien&BILLTOSTREET=123 Main St.&BILLTOSTREET2=Suite 267&BILLTOCITY=GILBERT
&BILLTOSTATE=AZ&BILLTOZIP=WRONGZIP&INVNUM=InvoiceNumber001&CUSTOM=CustomNumber001
Response:
RESPMSG = Verified: 10574-This card authorization verification is not a payment transaction.
CVV2MATCH = Y
HOSTCODE = 10574
PPREF = 3W881699AN973501D
CMD = curl ....................
IAVS = N
AUTHCODE = 111111
PROCAVS = Y
EXPDATE = 1024
PROCCVV2 = M
RESULT = 0
*AVSZIP = Y
TRANSTIME = 2020-05-08 07:40:45
AMT = 0.00
AVSADDR = Y
ACCT = 4009
CARDTYPE = 3
LASTNAME = NotProvided
PNREF = BE3P2D87ADA0
CORRELATIONID = 009e1072457da
BILLTOZIP=WRONGZIP
Is that the actual value you provided? Try 99999

Manatee.Trello Limited to 50 labels in a board

I am getting back all of the labels for a board and I guess we are hitting up against some limit now.
var board = new Board(boardString);
foreach (var label in board.Labels.ToList().OrderBy(x => x.Name))
{
Console.WriteLine(label.Name + " " + label.Id);
}
We have over 50 labels now and no dice? Any ideas?
As of version 1.17.0, I have added BoardLabelCollection.Filter(LabelColor) and BoardLabelCollection.Limit(int) to support this feature.

Accessing full size (851x315) timeline cover photo via graph api with offset crop

This is a continuous question of https://stackoverflow.com/a/21074207/3269910
the solution seems fine c0.0.851.315
but the c0.0 values are pointing to 0x0 position of the images
what i want is the image with offset_y . if an offset_y: 20,
ie, i want the same size and part of image, what i am seeing in my page timeline in a api call.
Is it possible to do this ?
Note: if i change c0.0 the zero value to some other then it is pointing to pixels but offset_y is % i think.
Thanks for your help.
I had discussion with Facebook Platform Team;
They are not ready to share the manual calculation to us.
and yes, it is possible to calculate value of c0.XXXX manually using your API offset_y value.
Here is my PHP code.
$fb_page_cover_json = json_decode( file_get_contents( 'https://graph.facebook.com/11111111?fields=cover'));
$fb_cover_image_url = $fb_page_cover_json->cover->source;
$image_info = getimagesize($fb_cover_image_url);
$image_width = $image_info[0];
$image_height = $image_info[1];
echo getTop($fb_page_cover_json->cover->offset_y,$image_width,$image_height);
function getTop($offset_y,$image_width,$image_height) {
$cover_w = 851;
$cover_h = 315;
$img_w = $image_width;
$img_h = $image_height;
$real_img_h = ($cover_w * $img_h / $img_w) - $cover_h;
$result = ($real_img_h * $offset_y / 100 * -1);
return floor($result);
}
The method getTop will return the c0.XXX value.
Hope this helps some one.

Macro that makes a Excel-list/log of mails in an account/folder

Here is my macro. I assumed that I could understand the codes and then edit it and get what I wanted
First: The macro abends whitout any progress at all: "Compile error: userdefined typenot defined"
I dont even know what this meens :)
(I use the macro now in an new and emty workbook)
Sub ListAllItemsInInbox()
Dim OLF As Outlook.MAPIFolder, CurrUser As String
Dim EmailItemCount As Integer, i As Integer, EmailCount As Integer
Application.ScreenUpdating = False
Workbooks.Add ' create a new workbook
' add headings
Cells(1, 1).Formula = "Subject"
Cells(1, 2).Formula = "Recieved"
Cells(1, 3).Formula = "Attachments"
Cells(1, 4).Formula = "Read"
With Range("A1:D1").Font
.Bold = True
.Size = 14
End With
Application.Calculation = xlCalculationManual
Set OLF = GetObject("", _
"Outlook.Application").GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
EmailItemCount = OLF.Items.Count
i = 0: EmailCount = 0
' read e-mail information
While i < EmailItemCount
i = i + 1
If i Mod 50 = 0 Then Application.StatusBar = "Reading e-mail messages " & _
Format(i / EmailItemCount, "0%") & "..."
With OLF.Items(i)
EmailCount = EmailCount + 1
Cells(EmailCount + 1, 1).Formula = .Subject
Cells(EmailCount + 1, 2).Formula = Format(.ReceivedTime, "dd.mm.yyyy hh:mm")
Cells(EmailCount + 1, 3).Formula = .Attachments.Count
Cells(EmailCount + 1, 4).Formula = Not .UnRead
End With
Wend
Application.Calculation = xlCalculationAutomatic
Set OLF = Nothing
Columns("A:D").AutoFit
Range("A2").Select
ActiveWindow.FreezePanes = True
ActiveWorkbook.Saved = True
Application.StatusBar = False
End Sub
As stated in the MSDN Article, which I have already provided in the comments above, you can bind with MS Outlook either by Late Binding (LB) or Early Binding (EB) from MS Excel.
Now what exactly is LB and EB? For this I would again direct you to another MSDN link.
When you are using EB, you have to set a reference to the relevant application from Tools ~~> References and set your reference to the relevant Outlook Object Library. For example
In Layman Terms, Excel now understands what Outlook and MAPIFolder is. Similarly olFolderInbox is an Outlook constant which has a value of 6. So your original code would have worked without any errors if you would have set the reference.
When you are usign LB, you do not set a reference. You declare your objects as Objects. There are analyzed by Excel during runtime. More about this has already been covered in the link above. Also since we are late binding, we have to explicitly use 6 instead of olFolderInbox as that is what it's value is.
Hope this sets you on the right track. Do ask questions if you have any.

Use form to check whether someone is older than given age

I've tried this code in order to get my form to tell me whether a customer is older than 16 or 18 if they're trying to hire a R16 or R18 movie.
HireMovieID and HireCustomerID are two text boxes on my form. MovieID and CustomerID are columns within my MovieList and CustomerInfo tables.
Private Sub HireCommand_Click()
If Not IsNumeric(HireMovieID) Or Not IsNumeric(HireCustomerID) Then
MsgBox "Error: Not a number"
Exit Sub
End If
Dim MovieRating As String
Dim CustomerDOB As Date
Dim Age16Check As Date
Dim Age18Check As Date
MovieRating = DLookup("[Rating]", "MovieList", "MovieID = [Forms]![HireForm]![HireMovieID]")
CustomerDOB = DLookup("[DOB]", "CustomerInfo", "CustomerID = [Forms]![HireForm]![HireCustomerID]")
Age16Check = DateSerial(-16, Month(Date), Day(Date))
Age18Check = DateSerial(-18, Month(Date), Day(Date))
If MovieRating = "R16" Then
If CustomerDOB > Age16Check Then
MsgBox "This customer is too young to hire this movie"
Else: MsgBox "This customer is old enough to hire this movie"
End If
ElseIf MovieRating = "R18" Then
If CustomerDOB > Age18Check Then
MsgBox "This customer is too young to hire this movie"
Else: MsgBox "This customer is old enough to hire this movie"
End If
Else: MsgBox "This movie does not have a restricted rating, thus this customer may hire this DVD"
End If
End Sub
EDIT: When I run this code, if I have an R16 movie selected, it will say that all the customers are too young to hire it? How can I fix this?
Thanks in advance for your help! :)