Returns the vouchers specified in the filter criteria.
Request
Response
XMLOPS
VB.NET
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | <?xml version="1.0" encoding="utf-8"?> <?qbposxml version="4.0"?> <QBPOSXML> <QBPOSXMLMsgsRq onError="stopOnError"> <VoucherQueryRq metaData="ENUMTYPE" iterator="ENUMTYPE" iteratorID="UUIDTYPE"> <MaxReturned >INTTYPE</MaxReturned> <!-- optional --> <OwnerID >GUIDTYPE</OwnerID> <!-- optional, may repeat --> <TxnID >IDTYPE</TxnID> <!-- optional --> <!-- BEGIN OR --> <TimeCreatedFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <TimeCreated >DATETIMETYPE</TimeCreated> <!-- required --> </TimeCreatedFilter> <!-- OR --> <TimeCreatedRangeFilter> <!-- optional --> <FromTimeCreated >DATETIMETYPE</FromTimeCreated> <!-- required --> <ToTimeCreated >DATETIMETYPE</ToTimeCreated> <!-- required --> </TimeCreatedRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <TimeModifiedFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <TimeModified >DATETIMETYPE</TimeModified> <!-- required --> </TimeModifiedFilter> <!-- OR --> <TimeModifiedRangeFilter> <!-- optional --> <FromTimeModified >DATETIMETYPE</FromTimeModified> <!-- required --> <ToTimeModified >DATETIMETYPE</ToTimeModified> <!-- required --> </TimeModifiedRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <AssociateFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <Associate >STRTYPE</Associate> <!-- required --> </AssociateFilter> <!-- OR --> <AssociateRangeFilter> <!-- optional --> <FromAssociate >STRTYPE</FromAssociate> <!-- required --> <ToAssociate >STRTYPE</ToAssociate> <!-- required --> </AssociateRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <CommentsFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <Comments >STRTYPE</Comments> <!-- required --> </CommentsFilter> <!-- OR --> <CommentsRangeFilter> <!-- optional --> <FromComments >STRTYPE</FromComments> <!-- required --> <ToComments >STRTYPE</ToComments> <!-- required --> </CommentsRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <CompanyNameFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <CompanyName >STRTYPE</CompanyName> <!-- required --> </CompanyNameFilter> <!-- OR --> <CompanyNameRangeFilter> <!-- optional --> <FromCompanyName >STRTYPE</FromCompanyName> <!-- required --> <ToCompanyName >STRTYPE</ToCompanyName> <!-- required --> </CompanyNameRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <DiscountFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <Discount >AMTTYPE</Discount> <!-- required --> </DiscountFilter> <!-- OR --> <DiscountRangeFilter> <!-- optional --> <FromDiscount >AMTTYPE</FromDiscount> <!-- required --> <ToDiscount >AMTTYPE</ToDiscount> <!-- required --> </DiscountRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <DiscountPercentFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <DiscountPercent >FLOATTYPE</DiscountPercent> <!-- required --> </DiscountPercentFilter> <!-- OR --> <DiscountPercentRangeFilter> <!-- optional --> <FromDiscountPercent >FLOATTYPE</FromDiscountPercent> <!-- required --> <ToDiscountPercent >FLOATTYPE</ToDiscountPercent> <!-- required --> </DiscountPercentRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <FeeFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <Fee >AMTTYPE</Fee> <!-- required --> </FeeFilter> <!-- OR --> <FeeRangeFilter> <!-- optional --> <FromFee >AMTTYPE</FromFee> <!-- required --> <ToFee >AMTTYPE</ToFee> <!-- required --> </FeeRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <FreightFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <Freight >AMTTYPE</Freight> <!-- required --> </FreightFilter> <!-- OR --> <FreightRangeFilter> <!-- optional --> <FromFreight >AMTTYPE</FromFreight> <!-- required --> <ToFreight >AMTTYPE</ToFreight> <!-- required --> </FreightRangeFilter> <!-- END OR --> <!-- HistoryDocStatus may have one of the following values: Regular, Reversed, Reversing --> <HistoryDocStatus >ENUMTYPE</HistoryDocStatus> <!-- optional --> <!-- BEGIN OR --> <InvoiceDateFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <InvoiceDate >DATETYPE</InvoiceDate> <!-- required --> </InvoiceDateFilter> <!-- OR --> <InvoiceDateRangeFilter> <!-- optional --> <FromInvoiceDate >DATETYPE</FromInvoiceDate> <!-- required --> <ToInvoiceDate >DATETYPE</ToInvoiceDate> <!-- required --> </InvoiceDateRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <InvoiceDueDateFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <InvoiceDueDate >DATETYPE</InvoiceDueDate> <!-- required --> </InvoiceDueDateFilter> <!-- OR --> <InvoiceDueDateRangeFilter> <!-- optional --> <FromInvoiceDueDate >DATETYPE</FromInvoiceDueDate> <!-- required --> <ToInvoiceDueDate >DATETYPE</ToInvoiceDueDate> <!-- required --> </InvoiceDueDateRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <InvoiceNumberFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <InvoiceNumber >STRTYPE</InvoiceNumber> <!-- required --> </InvoiceNumberFilter> <!-- OR --> <InvoiceNumberRangeFilter> <!-- optional --> <FromInvoiceNumber >STRTYPE</FromInvoiceNumber> <!-- required --> <ToInvoiceNumber >STRTYPE</ToInvoiceNumber> <!-- required --> </InvoiceNumberRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <ItemsCountFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <ItemsCount >INTTYPE</ItemsCount> <!-- required --> </ItemsCountFilter> <!-- OR --> <ItemsCountRangeFilter> <!-- optional --> <FromItemsCount >INTTYPE</FromItemsCount> <!-- required --> <ToItemsCount >INTTYPE</ToItemsCount> <!-- required --> </ItemsCountRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <PayeeCodeFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <PayeeCode >STRTYPE</PayeeCode> <!-- required --> </PayeeCodeFilter> <!-- OR --> <PayeeCodeRangeFilter> <!-- optional --> <FromPayeeCode >STRTYPE</FromPayeeCode> <!-- required --> <ToPayeeCode >STRTYPE</ToPayeeCode> <!-- required --> </PayeeCodeRangeFilter> <!-- END OR --> <PayeeListID >IDTYPE</PayeeListID> <!-- optional --> <!-- BEGIN OR --> <PayeeNameFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <PayeeName >STRTYPE</PayeeName> <!-- required --> </PayeeNameFilter> <!-- OR --> <PayeeNameRangeFilter> <!-- optional --> <FromPayeeName >STRTYPE</FromPayeeName> <!-- required --> <ToPayeeName >STRTYPE</ToPayeeName> <!-- required --> </PayeeNameRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <PurchaseOrderNumberFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <PurchaseOrderNumber >STRTYPE</PurchaseOrderNumber> <!-- required --> </PurchaseOrderNumberFilter> <!-- OR --> <PurchaseOrderNumberRangeFilter> <!-- optional --> <FromPurchaseOrderNumber >STRTYPE</FromPurchaseOrderNumber> <!-- required --> <ToPurchaseOrderNumber >STRTYPE</ToPurchaseOrderNumber> <!-- required --> </PurchaseOrderNumberRangeFilter> <!-- END OR --> <PurchaseOrderTxnID >IDTYPE</PurchaseOrderTxnID> <!-- optional --> <!-- QuickBooksFlag may have one of the following values: NotPosted, Completed, Error, UnbilledPurchases --> <QuickBooksFlag >ENUMTYPE</QuickBooksFlag> <!-- optional --> <!-- StoreExchangeStatus may have one of the following values: Modified, Sent, Acknowledged --> <StoreExchangeStatus >ENUMTYPE</StoreExchangeStatus> <!-- optional --> <!-- BEGIN OR --> <StoreNumberFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <StoreNumber >INTTYPE</StoreNumber> <!-- required --> </StoreNumberFilter> <!-- OR --> <StoreNumberRangeFilter> <!-- optional --> <FromStoreNumber >INTTYPE</FromStoreNumber> <!-- required --> <ToStoreNumber >INTTYPE</ToStoreNumber> <!-- required --> </StoreNumberRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <SubtotalFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <Subtotal >AMTTYPE</Subtotal> <!-- required --> </SubtotalFilter> <!-- OR --> <SubtotalRangeFilter> <!-- optional --> <FromSubtotal >AMTTYPE</FromSubtotal> <!-- required --> <ToSubtotal >AMTTYPE</ToSubtotal> <!-- required --> </SubtotalRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <TermsDiscountFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <TermsDiscount >FLOATTYPE</TermsDiscount> <!-- required --> </TermsDiscountFilter> <!-- OR --> <TermsDiscountRangeFilter> <!-- optional --> <FromTermsDiscount >FLOATTYPE</FromTermsDiscount> <!-- required --> <ToTermsDiscount >FLOATTYPE</ToTermsDiscount> <!-- required --> </TermsDiscountRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <TermsDiscountDaysFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <TermsDiscountDays >INTTYPE</TermsDiscountDays> <!-- required --> </TermsDiscountDaysFilter> <!-- OR --> <TermsDiscountDaysRangeFilter> <!-- optional --> <FromTermsDiscountDays >INTTYPE</FromTermsDiscountDays> <!-- required --> <ToTermsDiscountDays >INTTYPE</ToTermsDiscountDays> <!-- required --> </TermsDiscountDaysRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <TermsNetDaysFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <TermsNetDays >INTTYPE</TermsNetDays> <!-- required --> </TermsNetDaysFilter> <!-- OR --> <TermsNetDaysRangeFilter> <!-- optional --> <FromTermsNetDays >INTTYPE</FromTermsNetDays> <!-- required --> <ToTermsNetDays >INTTYPE</ToTermsNetDays> <!-- required --> </TermsNetDaysRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <TotalFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <Total >AMTTYPE</Total> <!-- required --> </TotalFilter> <!-- OR --> <TotalRangeFilter> <!-- optional --> <FromTotal >AMTTYPE</FromTotal> <!-- required --> <ToTotal >AMTTYPE</ToTotal> <!-- required --> </TotalRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <TotalQtyFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <TotalQty >QUANTYPE</TotalQty> <!-- required --> </TotalQtyFilter> <!-- OR --> <TotalQtyRangeFilter> <!-- optional --> <FromTotalQty >QUANTYPE</FromTotalQty> <!-- required --> <ToTotalQty >QUANTYPE</ToTotalQty> <!-- required --> </TotalQtyRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <TxnDateFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <TxnDate >DATETYPE</TxnDate> <!-- required --> </TxnDateFilter> <!-- OR --> <TxnDateRangeFilter> <!-- optional --> <FromTxnDate >DATETYPE</FromTxnDate> <!-- required --> <ToTxnDate >DATETYPE</ToTxnDate> <!-- required --> </TxnDateRangeFilter> <!-- END OR --> <!-- TxnState may have one of the following values: Normal, Held --> <TxnState >ENUMTYPE</TxnState> <!-- optional --> <!-- BEGIN OR --> <VendorCodeFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <VendorCode >STRTYPE</VendorCode> <!-- required --> </VendorCodeFilter> <!-- OR --> <VendorCodeRangeFilter> <!-- optional --> <FromVendorCode >STRTYPE</FromVendorCode> <!-- required --> <ToVendorCode >STRTYPE</ToVendorCode> <!-- required --> </VendorCodeRangeFilter> <!-- END OR --> <VendorListID >IDTYPE</VendorListID> <!-- optional --> <!-- BEGIN OR --> <VoucherNumberFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <VoucherNumber >INTTYPE</VoucherNumber> <!-- required --> </VoucherNumberFilter> <!-- OR --> <VoucherNumberRangeFilter> <!-- optional --> <FromVoucherNumber >INTTYPE</FromVoucherNumber> <!-- required --> <ToVoucherNumber >INTTYPE</ToVoucherNumber> <!-- required --> </VoucherNumberRangeFilter> <!-- END OR --> <!-- VoucherType may have one of the following values: Receiving, Return --> <VoucherType >ENUMTYPE</VoucherType> <!-- optional --> <!-- BEGIN OR --> <WorkstationFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <Workstation >INTTYPE</Workstation> <!-- required --> </WorkstationFilter> <!-- OR --> <WorkstationRangeFilter> <!-- optional --> <FromWorkstation >INTTYPE</FromWorkstation> <!-- required --> <ToWorkstation >INTTYPE</ToWorkstation> <!-- required --> </WorkstationRangeFilter> <!-- END OR --> <IncludeRetElement >STRTYPE</IncludeRetElement> <!-- optional, may repeat --> </VoucherQueryRq> <VoucherQueryRs statusCode="INTTYPE" statusSeverity="STRTYPE" statusMessage="STRTYPE" retCount="INTTYPE" iteratorRemainingCount="INTTYPE" iteratorID="UUIDTYPE"> <VoucherRet> <!-- optional, may repeat --> <TxnID >IDTYPE</TxnID> <!-- optional --> <TimeCreated >DATETIMETYPE</TimeCreated> <!-- optional --> <TimeModified >DATETIMETYPE</TimeModified> <!-- optional --> <Associate >STRTYPE</Associate> <!-- optional --> <Comments >STRTYPE</Comments> <!-- optional --> <CompanyName >STRTYPE</CompanyName> <!-- optional --> <Discount >AMTTYPE</Discount> <!-- optional --> <DiscountPercent >FLOATTYPE</DiscountPercent> <!-- optional --> <Fee >AMTTYPE</Fee> <!-- optional --> <Freight >AMTTYPE</Freight> <!-- optional --> <!-- HistoryDocStatus may have one of the following values: Regular, Reversed, Reversing --> <HistoryDocStatus >ENUMTYPE</HistoryDocStatus> <!-- optional --> <InvoiceDate >DATETYPE</InvoiceDate> <!-- optional --> <InvoiceDueDate >DATETYPE</InvoiceDueDate> <!-- optional --> <InvoiceNumber >STRTYPE</InvoiceNumber> <!-- optional --> <ItemsCount >INTTYPE</ItemsCount> <!-- optional --> <PayeeCode >STRTYPE</PayeeCode> <!-- optional --> <PayeeListID >IDTYPE</PayeeListID> <!-- optional --> <PayeeName >STRTYPE</PayeeName> <!-- optional --> <PurchaseOrderNumber >STRTYPE</PurchaseOrderNumber> <!-- optional --> <PurchaseOrderTxnID >IDTYPE</PurchaseOrderTxnID> <!-- optional --> <!-- QuickBooksFlag may have one of the following values: NotPosted, Completed, Error, UnbilledPurchases --> <QuickBooksFlag >ENUMTYPE</QuickBooksFlag> <!-- optional --> <!-- StoreExchangeStatus may have one of the following values: Modified, Sent, Acknowledged --> <StoreExchangeStatus >ENUMTYPE</StoreExchangeStatus> <!-- optional --> <StoreNumber >INTTYPE</StoreNumber> <!-- optional --> <Subtotal >AMTTYPE</Subtotal> <!-- optional --> <TermsDiscount >FLOATTYPE</TermsDiscount> <!-- optional --> <TermsDiscountDays >INTTYPE</TermsDiscountDays> <!-- optional --> <TermsNetDays >INTTYPE</TermsNetDays> <!-- optional --> <Total >AMTTYPE</Total> <!-- optional --> <TotalQty >QUANTYPE</TotalQty> <!-- optional --> <TxnDate >DATETYPE</TxnDate> <!-- optional --> <!-- TxnState may have one of the following values: Normal, Held --> <TxnState >ENUMTYPE</TxnState> <!-- optional --> <VendorCode >STRTYPE</VendorCode> <!-- optional --> <VendorListID >IDTYPE</VendorListID> <!-- optional --> <VoucherNumber >INTTYPE</VoucherNumber> <!-- optional --> <!-- VoucherType may have one of the following values: Receiving, Return --> <VoucherType >ENUMTYPE</VoucherType> <!-- optional --> <Workstation >INTTYPE</Workstation> <!-- optional --> <VoucherItemRet> <!-- optional, may repeat --> <ListID >IDTYPE</ListID> <!-- optional --> <ALU >STRTYPE</ALU> <!-- optional --> <Attribute >STRTYPE</Attribute> <!-- optional --> <Cost >AMTTYPE</Cost> <!-- optional --> <Desc1 >STRTYPE</Desc1> <!-- optional --> <Desc2 >STRTYPE</Desc2> <!-- optional --> <ExtendedCost >AMTTYPE</ExtendedCost> <!-- optional --> <ItemNumber >INTTYPE</ItemNumber> <!-- optional --> <NumberOfBaseUnits >QUANTYPE</NumberOfBaseUnits> <!-- optional --> <OriginalOrderQty >QUANTYPE</OriginalOrderQty> <!-- optional --> <QtyReceived >QUANTYPE</QtyReceived> <!-- optional --> <SerialNumber >STRTYPE</SerialNumber> <!-- optional --> <Size >STRTYPE</Size> <!-- optional --> <UnitOfMeasure >STRTYPE</UnitOfMeasure> <!-- optional --> <UPC >STRTYPE</UPC> <!-- optional --> </VoucherItemRet> <DataExtRet> <!-- optional, may repeat --> <OwnerID >GUIDTYPE</OwnerID> <!-- required --> <DataExtName >STRTYPE</DataExtName> <!-- required --> <!-- DataExtType may have one of the following values: INTTYPE, AMTTYPE, PRICETYPE, QUANTYPE, PERCENTTYPE, DATETIMETYPE, STR255TYPE, STR1024TYPE --> <DataExtType >ENUMTYPE</DataExtType> <!-- required --> <DataExtValue >STRTYPE</DataExtValue> <!-- required --> </DataExtRet> </VoucherRet> </VoucherQueryRs> </QBPOSXMLMsgsRq> </QBPOSXML> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 | 'The following sample code is generated as an illustration of
'Creating requests and parsing responses ONLY
'This code is NOT intended to show best practices or ideal code
'Use at your most careful discretion
imports System
imports System.Net
imports System.Drawing
imports System.Collections
imports System.ComponentModel
imports System.Windows.Forms
imports System.Data
imports System.IO
imports Interop.qbposfc4
Public Class SampleVoucherQuery
Public Sub DoVoucherQuery()
Dim sessionBegun as Boolean
sessionBegun = False
Dim connectionOpen as Boolean
connectionOpen = False
Dim sessionManager as QBPOSSessionManager
sessionManager = nothing
Try
'Create the session Manager object
sessionManager = new QBPOSSessionManager
'Create the message set request object to hold our request
Dim requestMsgSet as IMsgSetRequest
requestMsgSet = sessionManager.CreateMsgSetRequest(4,0)
requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue
BuildVoucherQueryRq(requestMsgSet)
'Connect to QuickBooks and begin a session
sessionManager.OpenConnection("","Sample Code from OSR")
connectionOpen = True
sessionManager.BeginSession("")
sessionBegun = True
'Send the request and get the response from QuickBooks
Dim responseMsgSet as IMsgSetResponse
responseMsgSet = sessionManager.DoRequests(requestMsgSet)
'End the session and close the connection to QuickBooks
sessionManager.EndSession()
sessionBegun = False
sessionManager.CloseConnection()
connectionOpen = False
WalkVoucherQueryRs(responseMsgSet)
Catch e as Exception
MessageBox.Show(e.Message, "Error")
if (sessionBegun) then
sessionManager.EndSession()
End If
if (connectionOpen) then
sessionManager.CloseConnection()
End If
End Try
End Sub
Public Sub BuildVoucherQueryRq(requestMsgSet as IMsgSetRequest)
Dim VoucherQueryRq as IVoucherQuery
VoucherQueryRq= requestMsgSet.AppendVoucherQueryRq()
'Set field value for MaxReturned
VoucherQueryRq.MaxReturned.SetValue(6)
'Set field value for OwnerIDList
'May create more than one of these if needed
VoucherQueryRq.OwnerIDList.Add(System.Guid.NewGuid().ToString())
'Set field value for TxnID
VoucherQueryRq.TxnID.SetValue("200000-1011023419")
Dim ORTimeCreatedFiltersElementType4851 as String
ORTimeCreatedFiltersElementType4851 = "TimeCreatedFilter"
if (ORTimeCreatedFiltersElementType4851 = "TimeCreatedFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for TimeCreated
VoucherQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.TimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
End If
if (ORTimeCreatedFiltersElementType4851 = "TimeCreatedRangeFilter") then
'Set field value for FromTimeCreated
VoucherQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.FromTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
'Set field value for ToTimeCreated
VoucherQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.ToTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
End If
Dim ORTimeModifiedFiltersElementType4852 as String
ORTimeModifiedFiltersElementType4852 = "TimeModifiedFilter"
if (ORTimeModifiedFiltersElementType4852 = "TimeModifiedFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for TimeModified
VoucherQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.TimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
End If
if (ORTimeModifiedFiltersElementType4852 = "TimeModifiedRangeFilter") then
'Set field value for FromTimeModified
VoucherQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.FromTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
'Set field value for ToTimeModified
VoucherQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.ToTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
End If
Dim ORAssociateFiltersElementType4853 as String
ORAssociateFiltersElementType4853 = "AssociateFilter"
if (ORAssociateFiltersElementType4853 = "AssociateFilter") then
'Set field value for MatchStringCriterion
VoucherQueryRq.ORAssociateFilters.AssociateFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for Associate
VoucherQueryRq.ORAssociateFilters.AssociateFilter.Associate.SetValue("ab")
End If
if (ORAssociateFiltersElementType4853 = "AssociateRangeFilter") then
'Set field value for FromAssociate
VoucherQueryRq.ORAssociateFilters.AssociateRangeFilter.FromAssociate.SetValue("ab")
'Set field value for ToAssociate
VoucherQueryRq.ORAssociateFilters.AssociateRangeFilter.ToAssociate.SetValue("ab")
End If
Dim ORCommentsFiltersElementType4854 as String
ORCommentsFiltersElementType4854 = "CommentsFilter"
if (ORCommentsFiltersElementType4854 = "CommentsFilter") then
'Set field value for MatchStringCriterion
VoucherQueryRq.ORCommentsFilters.CommentsFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for Comments
VoucherQueryRq.ORCommentsFilters.CommentsFilter.Comments.SetValue("ab")
End If
if (ORCommentsFiltersElementType4854 = "CommentsRangeFilter") then
'Set field value for FromComments
VoucherQueryRq.ORCommentsFilters.CommentsRangeFilter.FromComments.SetValue("ab")
'Set field value for ToComments
VoucherQueryRq.ORCommentsFilters.CommentsRangeFilter.ToComments.SetValue("ab")
End If
Dim ORCompanyNameFiltersElementType4855 as String
ORCompanyNameFiltersElementType4855 = "CompanyNameFilter"
if (ORCompanyNameFiltersElementType4855 = "CompanyNameFilter") then
'Set field value for MatchStringCriterion
VoucherQueryRq.ORCompanyNameFilters.CompanyNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for CompanyName
VoucherQueryRq.ORCompanyNameFilters.CompanyNameFilter.CompanyName.SetValue("ab")
End If
if (ORCompanyNameFiltersElementType4855 = "CompanyNameRangeFilter") then
'Set field value for FromCompanyName
VoucherQueryRq.ORCompanyNameFilters.CompanyNameRangeFilter.FromCompanyName.SetValue("ab")
'Set field value for ToCompanyName
VoucherQueryRq.ORCompanyNameFilters.CompanyNameRangeFilter.ToCompanyName.SetValue("ab")
End If
Dim ORDiscountFiltersElementType4856 as String
ORDiscountFiltersElementType4856 = "DiscountFilter"
if (ORDiscountFiltersElementType4856 = "DiscountFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORDiscountFilters.DiscountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for Discount
VoucherQueryRq.ORDiscountFilters.DiscountFilter.Discount.SetValue(10.01)
End If
if (ORDiscountFiltersElementType4856 = "DiscountRangeFilter") then
'Set field value for FromDiscount
VoucherQueryRq.ORDiscountFilters.DiscountRangeFilter.FromDiscount.SetValue(10.01)
'Set field value for ToDiscount
VoucherQueryRq.ORDiscountFilters.DiscountRangeFilter.ToDiscount.SetValue(10.01)
End If
Dim ORDiscountPercentFiltersElementType4857 as String
ORDiscountPercentFiltersElementType4857 = "DiscountPercentFilter"
if (ORDiscountPercentFiltersElementType4857 = "DiscountPercentFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORDiscountPercentFilters.DiscountPercentFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for DiscountPercent
VoucherQueryRq.ORDiscountPercentFilters.DiscountPercentFilter.DiscountPercent.SetValue(12.34)
End If
if (ORDiscountPercentFiltersElementType4857 = "DiscountPercentRangeFilter") then
'Set field value for FromDiscountPercent
VoucherQueryRq.ORDiscountPercentFilters.DiscountPercentRangeFilter.FromDiscountPercent.SetValue(12.34)
'Set field value for ToDiscountPercent
VoucherQueryRq.ORDiscountPercentFilters.DiscountPercentRangeFilter.ToDiscountPercent.SetValue(12.34)
End If
Dim ORFeeFiltersElementType4858 as String
ORFeeFiltersElementType4858 = "FeeFilter"
if (ORFeeFiltersElementType4858 = "FeeFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORFeeFilters.FeeFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for Fee
VoucherQueryRq.ORFeeFilters.FeeFilter.Fee.SetValue(10.01)
End If
if (ORFeeFiltersElementType4858 = "FeeRangeFilter") then
'Set field value for FromFee
VoucherQueryRq.ORFeeFilters.FeeRangeFilter.FromFee.SetValue(10.01)
'Set field value for ToFee
VoucherQueryRq.ORFeeFilters.FeeRangeFilter.ToFee.SetValue(10.01)
End If
Dim ORFreightFiltersElementType4859 as String
ORFreightFiltersElementType4859 = "FreightFilter"
if (ORFreightFiltersElementType4859 = "FreightFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORFreightFilters.FreightFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for Freight
VoucherQueryRq.ORFreightFilters.FreightFilter.Freight.SetValue(10.01)
End If
if (ORFreightFiltersElementType4859 = "FreightRangeFilter") then
'Set field value for FromFreight
VoucherQueryRq.ORFreightFilters.FreightRangeFilter.FromFreight.SetValue(10.01)
'Set field value for ToFreight
VoucherQueryRq.ORFreightFilters.FreightRangeFilter.ToFreight.SetValue(10.01)
End If
'Set field value for HistoryDocStatus
VoucherQueryRq.HistoryDocStatus.SetValue(ENHistoryDocStatus.hdsRegular)
Dim ORInvoiceDateFiltersElementType4860 as String
ORInvoiceDateFiltersElementType4860 = "InvoiceDateFilter"
if (ORInvoiceDateFiltersElementType4860 = "InvoiceDateFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORInvoiceDateFilters.InvoiceDateFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for InvoiceDate
VoucherQueryRq.ORInvoiceDateFilters.InvoiceDateFilter.InvoiceDate.SetValue(DateTime.Parse("12/15/2007"))
End If
if (ORInvoiceDateFiltersElementType4860 = "InvoiceDateRangeFilter") then
'Set field value for FromInvoiceDate
VoucherQueryRq.ORInvoiceDateFilters.InvoiceDateRangeFilter.FromInvoiceDate.SetValue(DateTime.Parse("12/15/2007"))
'Set field value for ToInvoiceDate
VoucherQueryRq.ORInvoiceDateFilters.InvoiceDateRangeFilter.ToInvoiceDate.SetValue(DateTime.Parse("12/15/2007"))
End If
Dim ORInvoiceDueDateFiltersElementType4861 as String
ORInvoiceDueDateFiltersElementType4861 = "InvoiceDueDateFilter"
if (ORInvoiceDueDateFiltersElementType4861 = "InvoiceDueDateFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORInvoiceDueDateFilters.InvoiceDueDateFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for InvoiceDueDate
VoucherQueryRq.ORInvoiceDueDateFilters.InvoiceDueDateFilter.InvoiceDueDate.SetValue(DateTime.Parse("12/15/2007"))
End If
if (ORInvoiceDueDateFiltersElementType4861 = "InvoiceDueDateRangeFilter") then
'Set field value for FromInvoiceDueDate
VoucherQueryRq.ORInvoiceDueDateFilters.InvoiceDueDateRangeFilter.FromInvoiceDueDate.SetValue(DateTime.Parse("12/15/2007"))
'Set field value for ToInvoiceDueDate
VoucherQueryRq.ORInvoiceDueDateFilters.InvoiceDueDateRangeFilter.ToInvoiceDueDate.SetValue(DateTime.Parse("12/15/2007"))
End If
Dim ORInvoiceNumberFiltersElementType4862 as String
ORInvoiceNumberFiltersElementType4862 = "InvoiceNumberFilter"
if (ORInvoiceNumberFiltersElementType4862 = "InvoiceNumberFilter") then
'Set field value for MatchStringCriterion
VoucherQueryRq.ORInvoiceNumberFilters.InvoiceNumberFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for InvoiceNumber
VoucherQueryRq.ORInvoiceNumberFilters.InvoiceNumberFilter.InvoiceNumber.SetValue("ab")
End If
if (ORInvoiceNumberFiltersElementType4862 = "InvoiceNumberRangeFilter") then
'Set field value for FromInvoiceNumber
VoucherQueryRq.ORInvoiceNumberFilters.InvoiceNumberRangeFilter.FromInvoiceNumber.SetValue("ab")
'Set field value for ToInvoiceNumber
VoucherQueryRq.ORInvoiceNumberFilters.InvoiceNumberRangeFilter.ToInvoiceNumber.SetValue("ab")
End If
Dim ORItemsCountFiltersElementType4863 as String
ORItemsCountFiltersElementType4863 = "ItemsCountFilter"
if (ORItemsCountFiltersElementType4863 = "ItemsCountFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORItemsCountFilters.ItemsCountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for ItemsCount
VoucherQueryRq.ORItemsCountFilters.ItemsCountFilter.ItemsCount.SetValue(6)
End If
if (ORItemsCountFiltersElementType4863 = "ItemsCountRangeFilter") then
'Set field value for FromItemsCount
VoucherQueryRq.ORItemsCountFilters.ItemsCountRangeFilter.FromItemsCount.SetValue(6)
'Set field value for ToItemsCount
VoucherQueryRq.ORItemsCountFilters.ItemsCountRangeFilter.ToItemsCount.SetValue(6)
End If
Dim ORPayeeCodeFiltersElementType4864 as String
ORPayeeCodeFiltersElementType4864 = "PayeeCodeFilter"
if (ORPayeeCodeFiltersElementType4864 = "PayeeCodeFilter") then
'Set field value for MatchStringCriterion
VoucherQueryRq.ORPayeeCodeFilters.PayeeCodeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for PayeeCode
VoucherQueryRq.ORPayeeCodeFilters.PayeeCodeFilter.PayeeCode.SetValue("ab")
End If
if (ORPayeeCodeFiltersElementType4864 = "PayeeCodeRangeFilter") then
'Set field value for FromPayeeCode
VoucherQueryRq.ORPayeeCodeFilters.PayeeCodeRangeFilter.FromPayeeCode.SetValue("ab")
'Set field value for ToPayeeCode
VoucherQueryRq.ORPayeeCodeFilters.PayeeCodeRangeFilter.ToPayeeCode.SetValue("ab")
End If
'Set field value for PayeeListID
VoucherQueryRq.PayeeListID.SetValue("200000-1011023419")
Dim ORPayeeNameFiltersElementType4865 as String
ORPayeeNameFiltersElementType4865 = "PayeeNameFilter"
if (ORPayeeNameFiltersElementType4865 = "PayeeNameFilter") then
'Set field value for MatchStringCriterion
VoucherQueryRq.ORPayeeNameFilters.PayeeNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for PayeeName
VoucherQueryRq.ORPayeeNameFilters.PayeeNameFilter.PayeeName.SetValue("ab")
End If
if (ORPayeeNameFiltersElementType4865 = "PayeeNameRangeFilter") then
'Set field value for FromPayeeName
VoucherQueryRq.ORPayeeNameFilters.PayeeNameRangeFilter.FromPayeeName.SetValue("ab")
'Set field value for ToPayeeName
VoucherQueryRq.ORPayeeNameFilters.PayeeNameRangeFilter.ToPayeeName.SetValue("ab")
End If
Dim ORPurchaseOrderNumberFiltersElementType4866 as String
ORPurchaseOrderNumberFiltersElementType4866 = "PurchaseOrderNumberFilter"
if (ORPurchaseOrderNumberFiltersElementType4866 = "PurchaseOrderNumberFilter") then
'Set field value for MatchStringCriterion
VoucherQueryRq.ORPurchaseOrderNumberFilters.PurchaseOrderNumberFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for PurchaseOrderNumber
VoucherQueryRq.ORPurchaseOrderNumberFilters.PurchaseOrderNumberFilter.PurchaseOrderNumber.SetValue("ab")
End If
if (ORPurchaseOrderNumberFiltersElementType4866 = "PurchaseOrderNumberRangeFilter") then
'Set field value for FromPurchaseOrderNumber
VoucherQueryRq.ORPurchaseOrderNumberFilters.PurchaseOrderNumberRangeFilter.FromPurchaseOrderNumber.SetValue("ab")
'Set field value for ToPurchaseOrderNumber
VoucherQueryRq.ORPurchaseOrderNumberFilters.PurchaseOrderNumberRangeFilter.ToPurchaseOrderNumber.SetValue("ab")
End If
'Set field value for PurchaseOrderTxnID
VoucherQueryRq.PurchaseOrderTxnID.SetValue("200000-1011023419")
'Set field value for QuickBooksFlag
VoucherQueryRq.QuickBooksFlag.SetValue(ENQuickBooksFlag.qbfNotPosted)
'Set field value for StoreExchangeStatus
VoucherQueryRq.StoreExchangeStatus.SetValue(ENStoreExchangeStatus.sesModified)
Dim ORStoreNumberFiltersElementType4867 as String
ORStoreNumberFiltersElementType4867 = "StoreNumberFilter"
if (ORStoreNumberFiltersElementType4867 = "StoreNumberFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORStoreNumberFilters.StoreNumberFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for StoreNumber
VoucherQueryRq.ORStoreNumberFilters.StoreNumberFilter.StoreNumber.SetValue(6)
End If
if (ORStoreNumberFiltersElementType4867 = "StoreNumberRangeFilter") then
'Set field value for FromStoreNumber
VoucherQueryRq.ORStoreNumberFilters.StoreNumberRangeFilter.FromStoreNumber.SetValue(6)
'Set field value for ToStoreNumber
VoucherQueryRq.ORStoreNumberFilters.StoreNumberRangeFilter.ToStoreNumber.SetValue(6)
End If
Dim ORSubtotalFiltersElementType4868 as String
ORSubtotalFiltersElementType4868 = "SubtotalFilter"
if (ORSubtotalFiltersElementType4868 = "SubtotalFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORSubtotalFilters.SubtotalFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for Subtotal
VoucherQueryRq.ORSubtotalFilters.SubtotalFilter.Subtotal.SetValue(10.01)
End If
if (ORSubtotalFiltersElementType4868 = "SubtotalRangeFilter") then
'Set field value for FromSubtotal
VoucherQueryRq.ORSubtotalFilters.SubtotalRangeFilter.FromSubtotal.SetValue(10.01)
'Set field value for ToSubtotal
VoucherQueryRq.ORSubtotalFilters.SubtotalRangeFilter.ToSubtotal.SetValue(10.01)
End If
Dim ORTermsDiscountFiltersElementType4869 as String
ORTermsDiscountFiltersElementType4869 = "TermsDiscountFilter"
if (ORTermsDiscountFiltersElementType4869 = "TermsDiscountFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORTermsDiscountFilters.TermsDiscountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for TermsDiscount
VoucherQueryRq.ORTermsDiscountFilters.TermsDiscountFilter.TermsDiscount.SetValue(12.34)
End If
if (ORTermsDiscountFiltersElementType4869 = "TermsDiscountRangeFilter") then
'Set field value for FromTermsDiscount
VoucherQueryRq.ORTermsDiscountFilters.TermsDiscountRangeFilter.FromTermsDiscount.SetValue(12.34)
'Set field value for ToTermsDiscount
VoucherQueryRq.ORTermsDiscountFilters.TermsDiscountRangeFilter.ToTermsDiscount.SetValue(12.34)
End If
Dim ORTermsDiscountDaysFiltersElementType4870 as String
ORTermsDiscountDaysFiltersElementType4870 = "TermsDiscountDaysFilter"
if (ORTermsDiscountDaysFiltersElementType4870 = "TermsDiscountDaysFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for TermsDiscountDays
VoucherQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysFilter.TermsDiscountDays.SetValue(6)
End If
if (ORTermsDiscountDaysFiltersElementType4870 = "TermsDiscountDaysRangeFilter") then
'Set field value for FromTermsDiscountDays
VoucherQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysRangeFilter.FromTermsDiscountDays.SetValue(6)
'Set field value for ToTermsDiscountDays
VoucherQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysRangeFilter.ToTermsDiscountDays.SetValue(6)
End If
Dim ORTermsNetDaysFiltersElementType4871 as String
ORTermsNetDaysFiltersElementType4871 = "TermsNetDaysFilter"
if (ORTermsNetDaysFiltersElementType4871 = "TermsNetDaysFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORTermsNetDaysFilters.TermsNetDaysFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for TermsNetDays
VoucherQueryRq.ORTermsNetDaysFilters.TermsNetDaysFilter.TermsNetDays.SetValue(6)
End If
if (ORTermsNetDaysFiltersElementType4871 = "TermsNetDaysRangeFilter") then
'Set field value for FromTermsNetDays
VoucherQueryRq.ORTermsNetDaysFilters.TermsNetDaysRangeFilter.FromTermsNetDays.SetValue(6)
'Set field value for ToTermsNetDays
VoucherQueryRq.ORTermsNetDaysFilters.TermsNetDaysRangeFilter.ToTermsNetDays.SetValue(6)
End If
Dim ORTotalFiltersElementType4872 as String
ORTotalFiltersElementType4872 = "TotalFilter"
if (ORTotalFiltersElementType4872 = "TotalFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORTotalFilters.TotalFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for Total
VoucherQueryRq.ORTotalFilters.TotalFilter.Total.SetValue(10.01)
End If
if (ORTotalFiltersElementType4872 = "TotalRangeFilter") then
'Set field value for FromTotal
VoucherQueryRq.ORTotalFilters.TotalRangeFilter.FromTotal.SetValue(10.01)
'Set field value for ToTotal
VoucherQueryRq.ORTotalFilters.TotalRangeFilter.ToTotal.SetValue(10.01)
End If
Dim ORTotalQtyFiltersElementType4873 as String
ORTotalQtyFiltersElementType4873 = "TotalQtyFilter"
if (ORTotalQtyFiltersElementType4873 = "TotalQtyFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORTotalQtyFilters.TotalQtyFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for TotalQty
VoucherQueryRq.ORTotalQtyFilters.TotalQtyFilter.TotalQty.SetValue(2)
End If
if (ORTotalQtyFiltersElementType4873 = "TotalQtyRangeFilter") then
'Set field value for FromTotalQty
VoucherQueryRq.ORTotalQtyFilters.TotalQtyRangeFilter.FromTotalQty.SetValue(2)
'Set field value for ToTotalQty
VoucherQueryRq.ORTotalQtyFilters.TotalQtyRangeFilter.ToTotalQty.SetValue(2)
End If
Dim ORTxnDateFiltersElementType4874 as String
ORTxnDateFiltersElementType4874 = "TxnDateFilter"
if (ORTxnDateFiltersElementType4874 = "TxnDateFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORTxnDateFilters.TxnDateFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for TxnDate
VoucherQueryRq.ORTxnDateFilters.TxnDateFilter.TxnDate.SetValue(DateTime.Parse("12/15/2007"))
End If
if (ORTxnDateFiltersElementType4874 = "TxnDateRangeFilter") then
'Set field value for FromTxnDate
VoucherQueryRq.ORTxnDateFilters.TxnDateRangeFilter.FromTxnDate.SetValue(DateTime.Parse("12/15/2007"))
'Set field value for ToTxnDate
VoucherQueryRq.ORTxnDateFilters.TxnDateRangeFilter.ToTxnDate.SetValue(DateTime.Parse("12/15/2007"))
End If
'Set field value for TxnState
VoucherQueryRq.TxnState.SetValue(ENTxnState.tsNormal)
Dim ORVendorCodeFiltersElementType4875 as String
ORVendorCodeFiltersElementType4875 = "VendorCodeFilter"
if (ORVendorCodeFiltersElementType4875 = "VendorCodeFilter") then
'Set field value for MatchStringCriterion
VoucherQueryRq.ORVendorCodeFilters.VendorCodeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for VendorCode
VoucherQueryRq.ORVendorCodeFilters.VendorCodeFilter.VendorCode.SetValue("ab")
End If
if (ORVendorCodeFiltersElementType4875 = "VendorCodeRangeFilter") then
'Set field value for FromVendorCode
VoucherQueryRq.ORVendorCodeFilters.VendorCodeRangeFilter.FromVendorCode.SetValue("ab")
'Set field value for ToVendorCode
VoucherQueryRq.ORVendorCodeFilters.VendorCodeRangeFilter.ToVendorCode.SetValue("ab")
End If
'Set field value for VendorListID
VoucherQueryRq.VendorListID.SetValue("200000-1011023419")
Dim ORVoucherNumberFiltersElementType4876 as String
ORVoucherNumberFiltersElementType4876 = "VoucherNumberFilter"
if (ORVoucherNumberFiltersElementType4876 = "VoucherNumberFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORVoucherNumberFilters.VoucherNumberFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for VoucherNumber
VoucherQueryRq.ORVoucherNumberFilters.VoucherNumberFilter.VoucherNumber.SetValue(6)
End If
if (ORVoucherNumberFiltersElementType4876 = "VoucherNumberRangeFilter") then
'Set field value for FromVoucherNumber
VoucherQueryRq.ORVoucherNumberFilters.VoucherNumberRangeFilter.FromVoucherNumber.SetValue(6)
'Set field value for ToVoucherNumber
VoucherQueryRq.ORVoucherNumberFilters.VoucherNumberRangeFilter.ToVoucherNumber.SetValue(6)
End If
'Set field value for VoucherType
VoucherQueryRq.VoucherType.SetValue(ENVoucherType.vtReceiving)
Dim ORWorkstationFiltersElementType4877 as String
ORWorkstationFiltersElementType4877 = "WorkstationFilter"
if (ORWorkstationFiltersElementType4877 = "WorkstationFilter") then
'Set field value for MatchNumericCriterion
VoucherQueryRq.ORWorkstationFilters.WorkstationFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for Workstation
VoucherQueryRq.ORWorkstationFilters.WorkstationFilter.Workstation.SetValue(6)
End If
if (ORWorkstationFiltersElementType4877 = "WorkstationRangeFilter") then
'Set field value for FromWorkstation
VoucherQueryRq.ORWorkstationFilters.WorkstationRangeFilter.FromWorkstation.SetValue(6)
'Set field value for ToWorkstation
VoucherQueryRq.ORWorkstationFilters.WorkstationRangeFilter.ToWorkstation.SetValue(6)
End If
'Set field value for IncludeRetElementList
'May create more than one of these if needed
VoucherQueryRq.IncludeRetElementList.Add("ab")
End Sub
Public Sub WalkVoucherQueryRs( responseMsgSet as IMsgSetResponse)
if (responseMsgSet is nothing) then
Exit Sub
End If
Dim responseList as IResponseList
responseList = responseMsgSet.ResponseList
if (responseList is nothing) then
Exit Sub
End If
'if we sent only one request, there is only one response, we'll walk the list for this sample
for j=0 to responseList.Count-1
Dim response as IResponse
response = responseList.GetAt(j)
'check the status code of the response, 0=ok, >0 is warning
if (response.StatusCode >= 0) then
'the request-specific response is in the details, make sure we have some
if (not response.Detail is nothing) then
'make sure the response is the type we're expecting
Dim responseType as ENResponseType
responseType = CType(response.Type.GetValue(),ENResponseType)
if (responseType = ENResponseType.rtVoucherQueryRs) then
'upcast to more specific type here, this is safe because we checked with response.Type check above
Dim VoucherRet as IVoucherRetList
VoucherRet = CType(response.Detail,IVoucherRetList)
for z=0 to VoucherRet.Count-1
WalkVoucherRet(VoucherRet.GetAt(z))
Next z
End If
End If
End If
Next j
End Sub
Public Sub WalkVoucherRet(VoucherRet as IVoucherRet)
if (VoucherRet is nothing) then
Exit Sub
End If
'Go through all the elements of IVoucherRetList
'Get value of TxnID
if ( not VoucherRet.TxnID is nothing) then
Dim TxnID4878 as String
TxnID4878 = VoucherRet.TxnID.GetValue()
End If
'Get value of TimeCreated
if ( not VoucherRet.TimeCreated is nothing) then
Dim TimeCreated4879 as DateTime
TimeCreated4879 = VoucherRet.TimeCreated.GetValue()
End If
'Get value of TimeModified
if ( not VoucherRet.TimeModified is nothing) then
Dim TimeModified4880 as DateTime
TimeModified4880 = VoucherRet.TimeModified.GetValue()
End If
'Get value of Associate
if ( not VoucherRet.Associate is nothing) then
Dim Associate4881 as String
Associate4881 = VoucherRet.Associate.GetValue()
End If
'Get value of Comments
if ( not VoucherRet.Comments is nothing) then
Dim Comments4882 as String
Comments4882 = VoucherRet.Comments.GetValue()
End If
'Get value of CompanyName
if ( not VoucherRet.CompanyName is nothing) then
Dim CompanyName4883 as String
CompanyName4883 = VoucherRet.CompanyName.GetValue()
End If
'Get value of Discount
if ( not VoucherRet.Discount is nothing) then
Dim Discount4884 as Double
Discount4884 = VoucherRet.Discount.GetValue()
End If
'Get value of DiscountPercent
if ( not VoucherRet.DiscountPercent is nothing) then
Dim DiscountPercent4885 as Single
DiscountPercent4885 = VoucherRet.DiscountPercent.GetValue()
End If
'Get value of Fee
if ( not VoucherRet.Fee is nothing) then
Dim Fee4886 as Double
Fee4886 = VoucherRet.Fee.GetValue()
End If
'Get value of Freight
if ( not VoucherRet.Freight is nothing) then
Dim Freight4887 as Double
Freight4887 = VoucherRet.Freight.GetValue()
End If
'Get value of HistoryDocStatus
if ( not VoucherRet.HistoryDocStatus is nothing) then
Dim HistoryDocStatus4888 as ENHistoryDocStatus
HistoryDocStatus4888 = VoucherRet.HistoryDocStatus.GetValue()
End If
'Get value of InvoiceDate
if ( not VoucherRet.InvoiceDate is nothing) then
Dim InvoiceDate4889 as DateTime
InvoiceDate4889 = VoucherRet.InvoiceDate.GetValue()
End If
'Get value of InvoiceDueDate
if ( not VoucherRet.InvoiceDueDate is nothing) then
Dim InvoiceDueDate4890 as DateTime
InvoiceDueDate4890 = VoucherRet.InvoiceDueDate.GetValue()
End If
'Get value of InvoiceNumber
if ( not VoucherRet.InvoiceNumber is nothing) then
Dim InvoiceNumber4891 as String
InvoiceNumber4891 = VoucherRet.InvoiceNumber.GetValue()
End If
'Get value of ItemsCount
if ( not VoucherRet.ItemsCount is nothing) then
Dim ItemsCount4892 as Integer
ItemsCount4892 = VoucherRet.ItemsCount.GetValue()
End If
'Get value of PayeeCode
if ( not VoucherRet.PayeeCode is nothing) then
Dim PayeeCode4893 as String
PayeeCode4893 = VoucherRet.PayeeCode.GetValue()
End If
'Get value of PayeeListID
if ( not VoucherRet.PayeeListID is nothing) then
Dim PayeeListID4894 as String
PayeeListID4894 = VoucherRet.PayeeListID.GetValue()
End If
'Get value of PayeeName
if ( not VoucherRet.PayeeName is nothing) then
Dim PayeeName4895 as String
PayeeName4895 = VoucherRet.PayeeName.GetValue()
End If
'Get value of PurchaseOrderNumber
if ( not VoucherRet.PurchaseOrderNumber is nothing) then
Dim PurchaseOrderNumber4896 as String
PurchaseOrderNumber4896 = VoucherRet.PurchaseOrderNumber.GetValue()
End If
'Get value of PurchaseOrderTxnID
if ( not VoucherRet.PurchaseOrderTxnID is nothing) then
Dim PurchaseOrderTxnID4897 as String
PurchaseOrderTxnID4897 = VoucherRet.PurchaseOrderTxnID.GetValue()
End If
'Get value of QuickBooksFlag
if ( not VoucherRet.QuickBooksFlag is nothing) then
Dim QuickBooksFlag4898 as ENQuickBooksFlag
QuickBooksFlag4898 = VoucherRet.QuickBooksFlag.GetValue()
End If
'Get value of StoreExchangeStatus
if ( not VoucherRet.StoreExchangeStatus is nothing) then
Dim StoreExchangeStatus4899 as ENStoreExchangeStatus
StoreExchangeStatus4899 = VoucherRet.StoreExchangeStatus.GetValue()
End If
'Get value of StoreNumber
if ( not VoucherRet.StoreNumber is nothing) then
Dim StoreNumber4900 as Integer
StoreNumber4900 = VoucherRet.StoreNumber.GetValue()
End If
'Get value of Subtotal
if ( not VoucherRet.Subtotal is nothing) then
Dim Subtotal4901 as Double
Subtotal4901 = VoucherRet.Subtotal.GetValue()
End If
'Get value of TermsDiscount
if ( not VoucherRet.TermsDiscount is nothing) then
Dim TermsDiscount4902 as Single
TermsDiscount4902 = VoucherRet.TermsDiscount.GetValue()
End If
'Get value of TermsDiscountDays
if ( not VoucherRet.TermsDiscountDays is nothing) then
Dim TermsDiscountDays4903 as Integer
TermsDiscountDays4903 = VoucherRet.TermsDiscountDays.GetValue()
End If
'Get value of TermsNetDays
if ( not VoucherRet.TermsNetDays is nothing) then
Dim TermsNetDays4904 as Integer
TermsNetDays4904 = VoucherRet.TermsNetDays.GetValue()
End If
'Get value of Total
if ( not VoucherRet.Total is nothing) then
Dim Total4905 as Double
Total4905 = VoucherRet.Total.GetValue()
End If
'Get value of TotalQty
if ( not VoucherRet.TotalQty is nothing) then
Dim TotalQty4906 as Double
TotalQty4906 = VoucherRet.TotalQty.GetValue()
End If
'Get value of TxnDate
if ( not VoucherRet.TxnDate is nothing) then
Dim TxnDate4907 as DateTime
TxnDate4907 = VoucherRet.TxnDate.GetValue()
End If
'Get value of TxnState
if ( not VoucherRet.TxnState is nothing) then
Dim TxnState4908 as ENTxnState
TxnState4908 = VoucherRet.TxnState.GetValue()
End If
'Get value of VendorCode
if ( not VoucherRet.VendorCode is nothing) then
Dim VendorCode4909 as String
VendorCode4909 = VoucherRet.VendorCode.GetValue()
End If
'Get value of VendorListID
if ( not VoucherRet.VendorListID is nothing) then
Dim VendorListID4910 as String
VendorListID4910 = VoucherRet.VendorListID.GetValue()
End If
'Get value of VoucherNumber
if ( not VoucherRet.VoucherNumber is nothing) then
Dim VoucherNumber4911 as Integer
VoucherNumber4911 = VoucherRet.VoucherNumber.GetValue()
End If
'Get value of VoucherType
if ( not VoucherRet.VoucherType is nothing) then
Dim VoucherType4912 as ENVoucherType
VoucherType4912 = VoucherRet.VoucherType.GetValue()
End If
'Get value of Workstation
if ( not VoucherRet.Workstation is nothing) then
Dim Workstation4913 as Integer
Workstation4913 = VoucherRet.Workstation.GetValue()
End If
if (not VoucherRet.VoucherItemRetList is nothing)
Dim i4914 as Integer
for i4914 = 0 to VoucherRet.VoucherItemRetList.Count - 1
Dim VoucherItemRet as IVoucherItemRet
VoucherItemRet = VoucherRet.VoucherItemRetList.GetAt(i4914)
'Get value of ListID
if ( not VoucherItemRet.ListID is nothing) then
Dim ListID4915 as String
ListID4915 = VoucherItemRet.ListID.GetValue()
End If
'Get value of ALU
if ( not VoucherItemRet.ALU is nothing) then
Dim ALU4916 as String
ALU4916 = VoucherItemRet.ALU.GetValue()
End If
'Get value of Attribute
if ( not VoucherItemRet.Attribute is nothing) then
Dim Attribute4917 as String
Attribute4917 = VoucherItemRet.Attribute.GetValue()
End If
'Get value of Cost
if ( not VoucherItemRet.Cost is nothing) then
Dim Cost4918 as Double
Cost4918 = VoucherItemRet.Cost.GetValue()
End If
'Get value of Desc1
if ( not VoucherItemRet.Desc1 is nothing) then
Dim Desc14919 as String
Desc14919 = VoucherItemRet.Desc1.GetValue()
End If
'Get value of Desc2
if ( not VoucherItemRet.Desc2 is nothing) then
Dim Desc24920 as String
Desc24920 = VoucherItemRet.Desc2.GetValue()
End If
'Get value of ExtendedCost
if ( not VoucherItemRet.ExtendedCost is nothing) then
Dim ExtendedCost4921 as Double
ExtendedCost4921 = VoucherItemRet.ExtendedCost.GetValue()
End If
'Get value of ItemNumber
if ( not VoucherItemRet.ItemNumber is nothing) then
Dim ItemNumber4922 as Integer
ItemNumber4922 = VoucherItemRet.ItemNumber.GetValue()
End If
'Get value of NumberOfBaseUnits
if ( not VoucherItemRet.NumberOfBaseUnits is nothing) then
Dim NumberOfBaseUnits4923 as Double
NumberOfBaseUnits4923 = VoucherItemRet.NumberOfBaseUnits.GetValue()
End If
'Get value of OriginalOrderQty
if ( not VoucherItemRet.OriginalOrderQty is nothing) then
Dim OriginalOrderQty4924 as Double
OriginalOrderQty4924 = VoucherItemRet.OriginalOrderQty.GetValue()
End If
'Get value of QtyReceived
if ( not VoucherItemRet.QtyReceived is nothing) then
Dim QtyReceived4925 as Double
QtyReceived4925 = VoucherItemRet.QtyReceived.GetValue()
End If
'Get value of SerialNumber
if ( not VoucherItemRet.SerialNumber is nothing) then
Dim SerialNumber4926 as String
SerialNumber4926 = VoucherItemRet.SerialNumber.GetValue()
End If
'Get value of Size
if ( not VoucherItemRet.Size is nothing) then
Dim Size4927 as String
Size4927 = VoucherItemRet.Size.GetValue()
End If
'Get value of UnitOfMeasure
if ( not VoucherItemRet.UnitOfMeasure is nothing) then
Dim UnitOfMeasure4928 as String
UnitOfMeasure4928 = VoucherItemRet.UnitOfMeasure.GetValue()
End If
'Get value of UPC
if ( not VoucherItemRet.UPC is nothing) then
Dim UPC4929 as String
UPC4929 = VoucherItemRet.UPC.GetValue()
End If
Next i4914
End If
if (not VoucherRet.DataExtRetList is nothing)
Dim i4930 as Integer
for i4930 = 0 to VoucherRet.DataExtRetList.Count - 1
Dim DataExtRet as IDataExtRet
DataExtRet = VoucherRet.DataExtRetList.GetAt(i4930)
'Get value of OwnerID
Dim OwnerID4931 as String
OwnerID4931 = DataExtRet.OwnerID.GetValue()
'Get value of DataExtName
Dim DataExtName4932 as String
DataExtName4932 = DataExtRet.DataExtName.GetValue()
'Get value of DataExtType
Dim DataExtType4933 as ENDataExtType
DataExtType4933 = DataExtRet.DataExtType.GetValue()
'Get value of DataExtValue
Dim DataExtValue4934 as String
DataExtValue4934 = DataExtRet.DataExtValue.GetValue()
Next i4930
End If
End Sub
End Class
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 | //The following sample code is generated as an illustration of //Creating requests and parsing responses ONLY //This code is NOT intended to show best practices or ideal code //Use at your most careful discretion using System; using System.Net; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.IO; using Interop.qbposfc4; namespace com.intuit.idn.samples { public class SampleVoucherQuery { public void DoVoucherQuery() { bool sessionBegun = false; bool connectionOpen = false; QBPOSSessionManager sessionManager = null; try { //Create the session Manager object sessionManager = new QBPOSSessionManager(); //Create the message set request object to hold our request IMsgSetRequest requestMsgSet = sessionManager.CreateMsgSetRequest(4,0); requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue; BuildVoucherQueryRq(requestMsgSet); //Connect to QuickBooks and begin a session sessionManager.OpenConnection("","Sample Code from OSR"); connectionOpen = true; sessionManager.BeginSession(""); sessionBegun = true; //Send the request and get the response from QuickBooks IMsgSetResponse responseMsgSet = sessionManager.DoRequests(requestMsgSet); //End the session and close the connection to QuickBooks sessionManager.EndSession(); sessionBegun = false; sessionManager.CloseConnection(); connectionOpen = false; WalkVoucherQueryRs(responseMsgSet); } catch (Exception e) { MessageBox.Show(e.Message, "Error"); if (sessionBegun) { sessionManager.EndSession(); } if (connectionOpen) { sessionManager.CloseConnection(); } } } void BuildVoucherQueryRq(IMsgSetRequest requestMsgSet) { IVoucherQuery VoucherQueryRq= requestMsgSet.AppendVoucherQueryRq(); //Set attributes //Set field value for metaData VoucherQueryRq.metaData.SetValue(ENmetaData.mdMetaDataAndResponseData); //Set field value for iterator VoucherQueryRq.iterator.SetValue(ENiterator.itStart); //Set field value for iteratorID VoucherQueryRq.iteratorID.SetValue("{D7355385-A17B-4f5d-B34D-F34C79C3E6FC}"); //Set field value for MaxReturned VoucherQueryRq.MaxReturned.SetValue(6); //Set field value for OwnerIDList //May create more than one of these if needed VoucherQueryRq.OwnerIDList.Add(Guid.NewGuid().ToString()); //Set field value for TxnID VoucherQueryRq.TxnID.SetValue("200000-1011023419"); string ORTimeCreatedFiltersElementType4935 = "TimeCreatedFilter"; if (ORTimeCreatedFiltersElementType4935 == "TimeCreatedFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for TimeCreated VoucherQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.TimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false); } if (ORTimeCreatedFiltersElementType4935 == "TimeCreatedRangeFilter") { //Set field value for FromTimeCreated VoucherQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.FromTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false); //Set field value for ToTimeCreated VoucherQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.ToTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false); } string ORTimeModifiedFiltersElementType4936 = "TimeModifiedFilter"; if (ORTimeModifiedFiltersElementType4936 == "TimeModifiedFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for TimeModified VoucherQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.TimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false); } if (ORTimeModifiedFiltersElementType4936 == "TimeModifiedRangeFilter") { //Set field value for FromTimeModified VoucherQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.FromTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false); //Set field value for ToTimeModified VoucherQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.ToTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false); } string ORAssociateFiltersElementType4937 = "AssociateFilter"; if (ORAssociateFiltersElementType4937 == "AssociateFilter") { //Set field value for MatchStringCriterion VoucherQueryRq.ORAssociateFilters.AssociateFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for Associate VoucherQueryRq.ORAssociateFilters.AssociateFilter.Associate.SetValue("ab"); } if (ORAssociateFiltersElementType4937 == "AssociateRangeFilter") { //Set field value for FromAssociate VoucherQueryRq.ORAssociateFilters.AssociateRangeFilter.FromAssociate.SetValue("ab"); //Set field value for ToAssociate VoucherQueryRq.ORAssociateFilters.AssociateRangeFilter.ToAssociate.SetValue("ab"); } string ORCommentsFiltersElementType4938 = "CommentsFilter"; if (ORCommentsFiltersElementType4938 == "CommentsFilter") { //Set field value for MatchStringCriterion VoucherQueryRq.ORCommentsFilters.CommentsFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for Comments VoucherQueryRq.ORCommentsFilters.CommentsFilter.Comments.SetValue("ab"); } if (ORCommentsFiltersElementType4938 == "CommentsRangeFilter") { //Set field value for FromComments VoucherQueryRq.ORCommentsFilters.CommentsRangeFilter.FromComments.SetValue("ab"); //Set field value for ToComments VoucherQueryRq.ORCommentsFilters.CommentsRangeFilter.ToComments.SetValue("ab"); } string ORCompanyNameFiltersElementType4939 = "CompanyNameFilter"; if (ORCompanyNameFiltersElementType4939 == "CompanyNameFilter") { //Set field value for MatchStringCriterion VoucherQueryRq.ORCompanyNameFilters.CompanyNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for CompanyName VoucherQueryRq.ORCompanyNameFilters.CompanyNameFilter.CompanyName.SetValue("ab"); } if (ORCompanyNameFiltersElementType4939 == "CompanyNameRangeFilter") { //Set field value for FromCompanyName VoucherQueryRq.ORCompanyNameFilters.CompanyNameRangeFilter.FromCompanyName.SetValue("ab"); //Set field value for ToCompanyName VoucherQueryRq.ORCompanyNameFilters.CompanyNameRangeFilter.ToCompanyName.SetValue("ab"); } string ORDiscountFiltersElementType4940 = "DiscountFilter"; if (ORDiscountFiltersElementType4940 == "DiscountFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORDiscountFilters.DiscountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for Discount VoucherQueryRq.ORDiscountFilters.DiscountFilter.Discount.SetValue(10.01); } if (ORDiscountFiltersElementType4940 == "DiscountRangeFilter") { //Set field value for FromDiscount VoucherQueryRq.ORDiscountFilters.DiscountRangeFilter.FromDiscount.SetValue(10.01); //Set field value for ToDiscount VoucherQueryRq.ORDiscountFilters.DiscountRangeFilter.ToDiscount.SetValue(10.01); } string ORDiscountPercentFiltersElementType4941 = "DiscountPercentFilter"; if (ORDiscountPercentFiltersElementType4941 == "DiscountPercentFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORDiscountPercentFilters.DiscountPercentFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for DiscountPercent VoucherQueryRq.ORDiscountPercentFilters.DiscountPercentFilter.DiscountPercent.SetValue(12.34F); } if (ORDiscountPercentFiltersElementType4941 == "DiscountPercentRangeFilter") { //Set field value for FromDiscountPercent VoucherQueryRq.ORDiscountPercentFilters.DiscountPercentRangeFilter.FromDiscountPercent.SetValue(12.34F); //Set field value for ToDiscountPercent VoucherQueryRq.ORDiscountPercentFilters.DiscountPercentRangeFilter.ToDiscountPercent.SetValue(12.34F); } string ORFeeFiltersElementType4942 = "FeeFilter"; if (ORFeeFiltersElementType4942 == "FeeFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORFeeFilters.FeeFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for Fee VoucherQueryRq.ORFeeFilters.FeeFilter.Fee.SetValue(10.01); } if (ORFeeFiltersElementType4942 == "FeeRangeFilter") { //Set field value for FromFee VoucherQueryRq.ORFeeFilters.FeeRangeFilter.FromFee.SetValue(10.01); //Set field value for ToFee VoucherQueryRq.ORFeeFilters.FeeRangeFilter.ToFee.SetValue(10.01); } string ORFreightFiltersElementType4943 = "FreightFilter"; if (ORFreightFiltersElementType4943 == "FreightFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORFreightFilters.FreightFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for Freight VoucherQueryRq.ORFreightFilters.FreightFilter.Freight.SetValue(10.01); } if (ORFreightFiltersElementType4943 == "FreightRangeFilter") { //Set field value for FromFreight VoucherQueryRq.ORFreightFilters.FreightRangeFilter.FromFreight.SetValue(10.01); //Set field value for ToFreight VoucherQueryRq.ORFreightFilters.FreightRangeFilter.ToFreight.SetValue(10.01); } //Set field value for HistoryDocStatus VoucherQueryRq.HistoryDocStatus.SetValue(ENHistoryDocStatus.hdsRegular); string ORInvoiceDateFiltersElementType4944 = "InvoiceDateFilter"; if (ORInvoiceDateFiltersElementType4944 == "InvoiceDateFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORInvoiceDateFilters.InvoiceDateFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for InvoiceDate VoucherQueryRq.ORInvoiceDateFilters.InvoiceDateFilter.InvoiceDate.SetValue(DateTime.Parse("12/15/2007")); } if (ORInvoiceDateFiltersElementType4944 == "InvoiceDateRangeFilter") { //Set field value for FromInvoiceDate VoucherQueryRq.ORInvoiceDateFilters.InvoiceDateRangeFilter.FromInvoiceDate.SetValue(DateTime.Parse("12/15/2007")); //Set field value for ToInvoiceDate VoucherQueryRq.ORInvoiceDateFilters.InvoiceDateRangeFilter.ToInvoiceDate.SetValue(DateTime.Parse("12/15/2007")); } string ORInvoiceDueDateFiltersElementType4945 = "InvoiceDueDateFilter"; if (ORInvoiceDueDateFiltersElementType4945 == "InvoiceDueDateFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORInvoiceDueDateFilters.InvoiceDueDateFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for InvoiceDueDate VoucherQueryRq.ORInvoiceDueDateFilters.InvoiceDueDateFilter.InvoiceDueDate.SetValue(DateTime.Parse("12/15/2007")); } if (ORInvoiceDueDateFiltersElementType4945 == "InvoiceDueDateRangeFilter") { //Set field value for FromInvoiceDueDate VoucherQueryRq.ORInvoiceDueDateFilters.InvoiceDueDateRangeFilter.FromInvoiceDueDate.SetValue(DateTime.Parse("12/15/2007")); //Set field value for ToInvoiceDueDate VoucherQueryRq.ORInvoiceDueDateFilters.InvoiceDueDateRangeFilter.ToInvoiceDueDate.SetValue(DateTime.Parse("12/15/2007")); } string ORInvoiceNumberFiltersElementType4946 = "InvoiceNumberFilter"; if (ORInvoiceNumberFiltersElementType4946 == "InvoiceNumberFilter") { //Set field value for MatchStringCriterion VoucherQueryRq.ORInvoiceNumberFilters.InvoiceNumberFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for InvoiceNumber VoucherQueryRq.ORInvoiceNumberFilters.InvoiceNumberFilter.InvoiceNumber.SetValue("ab"); } if (ORInvoiceNumberFiltersElementType4946 == "InvoiceNumberRangeFilter") { //Set field value for FromInvoiceNumber VoucherQueryRq.ORInvoiceNumberFilters.InvoiceNumberRangeFilter.FromInvoiceNumber.SetValue("ab"); //Set field value for ToInvoiceNumber VoucherQueryRq.ORInvoiceNumberFilters.InvoiceNumberRangeFilter.ToInvoiceNumber.SetValue("ab"); } string ORItemsCountFiltersElementType4947 = "ItemsCountFilter"; if (ORItemsCountFiltersElementType4947 == "ItemsCountFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORItemsCountFilters.ItemsCountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for ItemsCount VoucherQueryRq.ORItemsCountFilters.ItemsCountFilter.ItemsCount.SetValue(6); } if (ORItemsCountFiltersElementType4947 == "ItemsCountRangeFilter") { //Set field value for FromItemsCount VoucherQueryRq.ORItemsCountFilters.ItemsCountRangeFilter.FromItemsCount.SetValue(6); //Set field value for ToItemsCount VoucherQueryRq.ORItemsCountFilters.ItemsCountRangeFilter.ToItemsCount.SetValue(6); } string ORPayeeCodeFiltersElementType4948 = "PayeeCodeFilter"; if (ORPayeeCodeFiltersElementType4948 == "PayeeCodeFilter") { //Set field value for MatchStringCriterion VoucherQueryRq.ORPayeeCodeFilters.PayeeCodeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for PayeeCode VoucherQueryRq.ORPayeeCodeFilters.PayeeCodeFilter.PayeeCode.SetValue("ab"); } if (ORPayeeCodeFiltersElementType4948 == "PayeeCodeRangeFilter") { //Set field value for FromPayeeCode VoucherQueryRq.ORPayeeCodeFilters.PayeeCodeRangeFilter.FromPayeeCode.SetValue("ab"); //Set field value for ToPayeeCode VoucherQueryRq.ORPayeeCodeFilters.PayeeCodeRangeFilter.ToPayeeCode.SetValue("ab"); } //Set field value for PayeeListID VoucherQueryRq.PayeeListID.SetValue("200000-1011023419"); string ORPayeeNameFiltersElementType4949 = "PayeeNameFilter"; if (ORPayeeNameFiltersElementType4949 == "PayeeNameFilter") { //Set field value for MatchStringCriterion VoucherQueryRq.ORPayeeNameFilters.PayeeNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for PayeeName VoucherQueryRq.ORPayeeNameFilters.PayeeNameFilter.PayeeName.SetValue("ab"); } if (ORPayeeNameFiltersElementType4949 == "PayeeNameRangeFilter") { //Set field value for FromPayeeName VoucherQueryRq.ORPayeeNameFilters.PayeeNameRangeFilter.FromPayeeName.SetValue("ab"); //Set field value for ToPayeeName VoucherQueryRq.ORPayeeNameFilters.PayeeNameRangeFilter.ToPayeeName.SetValue("ab"); } string ORPurchaseOrderNumberFiltersElementType4950 = "PurchaseOrderNumberFilter"; if (ORPurchaseOrderNumberFiltersElementType4950 == "PurchaseOrderNumberFilter") { //Set field value for MatchStringCriterion VoucherQueryRq.ORPurchaseOrderNumberFilters.PurchaseOrderNumberFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for PurchaseOrderNumber VoucherQueryRq.ORPurchaseOrderNumberFilters.PurchaseOrderNumberFilter.PurchaseOrderNumber.SetValue("ab"); } if (ORPurchaseOrderNumberFiltersElementType4950 == "PurchaseOrderNumberRangeFilter") { //Set field value for FromPurchaseOrderNumber VoucherQueryRq.ORPurchaseOrderNumberFilters.PurchaseOrderNumberRangeFilter.FromPurchaseOrderNumber.SetValue("ab"); //Set field value for ToPurchaseOrderNumber VoucherQueryRq.ORPurchaseOrderNumberFilters.PurchaseOrderNumberRangeFilter.ToPurchaseOrderNumber.SetValue("ab"); } //Set field value for PurchaseOrderTxnID VoucherQueryRq.PurchaseOrderTxnID.SetValue("200000-1011023419"); //Set field value for QuickBooksFlag VoucherQueryRq.QuickBooksFlag.SetValue(ENQuickBooksFlag.qbfNotPosted); //Set field value for StoreExchangeStatus VoucherQueryRq.StoreExchangeStatus.SetValue(ENStoreExchangeStatus.sesModified); string ORStoreNumberFiltersElementType4951 = "StoreNumberFilter"; if (ORStoreNumberFiltersElementType4951 == "StoreNumberFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORStoreNumberFilters.StoreNumberFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for StoreNumber VoucherQueryRq.ORStoreNumberFilters.StoreNumberFilter.StoreNumber.SetValue(6); } if (ORStoreNumberFiltersElementType4951 == "StoreNumberRangeFilter") { //Set field value for FromStoreNumber VoucherQueryRq.ORStoreNumberFilters.StoreNumberRangeFilter.FromStoreNumber.SetValue(6); //Set field value for ToStoreNumber VoucherQueryRq.ORStoreNumberFilters.StoreNumberRangeFilter.ToStoreNumber.SetValue(6); } string ORSubtotalFiltersElementType4952 = "SubtotalFilter"; if (ORSubtotalFiltersElementType4952 == "SubtotalFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORSubtotalFilters.SubtotalFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for Subtotal VoucherQueryRq.ORSubtotalFilters.SubtotalFilter.Subtotal.SetValue(10.01); } if (ORSubtotalFiltersElementType4952 == "SubtotalRangeFilter") { //Set field value for FromSubtotal VoucherQueryRq.ORSubtotalFilters.SubtotalRangeFilter.FromSubtotal.SetValue(10.01); //Set field value for ToSubtotal VoucherQueryRq.ORSubtotalFilters.SubtotalRangeFilter.ToSubtotal.SetValue(10.01); } string ORTermsDiscountFiltersElementType4953 = "TermsDiscountFilter"; if (ORTermsDiscountFiltersElementType4953 == "TermsDiscountFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORTermsDiscountFilters.TermsDiscountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for TermsDiscount VoucherQueryRq.ORTermsDiscountFilters.TermsDiscountFilter.TermsDiscount.SetValue(12.34F); } if (ORTermsDiscountFiltersElementType4953 == "TermsDiscountRangeFilter") { //Set field value for FromTermsDiscount VoucherQueryRq.ORTermsDiscountFilters.TermsDiscountRangeFilter.FromTermsDiscount.SetValue(12.34F); //Set field value for ToTermsDiscount VoucherQueryRq.ORTermsDiscountFilters.TermsDiscountRangeFilter.ToTermsDiscount.SetValue(12.34F); } string ORTermsDiscountDaysFiltersElementType4954 = "TermsDiscountDaysFilter"; if (ORTermsDiscountDaysFiltersElementType4954 == "TermsDiscountDaysFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for TermsDiscountDays VoucherQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysFilter.TermsDiscountDays.SetValue(6); } if (ORTermsDiscountDaysFiltersElementType4954 == "TermsDiscountDaysRangeFilter") { //Set field value for FromTermsDiscountDays VoucherQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysRangeFilter.FromTermsDiscountDays.SetValue(6); //Set field value for ToTermsDiscountDays VoucherQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysRangeFilter.ToTermsDiscountDays.SetValue(6); } string ORTermsNetDaysFiltersElementType4955 = "TermsNetDaysFilter"; if (ORTermsNetDaysFiltersElementType4955 == "TermsNetDaysFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORTermsNetDaysFilters.TermsNetDaysFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for TermsNetDays VoucherQueryRq.ORTermsNetDaysFilters.TermsNetDaysFilter.TermsNetDays.SetValue(6); } if (ORTermsNetDaysFiltersElementType4955 == "TermsNetDaysRangeFilter") { //Set field value for FromTermsNetDays VoucherQueryRq.ORTermsNetDaysFilters.TermsNetDaysRangeFilter.FromTermsNetDays.SetValue(6); //Set field value for ToTermsNetDays VoucherQueryRq.ORTermsNetDaysFilters.TermsNetDaysRangeFilter.ToTermsNetDays.SetValue(6); } string ORTotalFiltersElementType4956 = "TotalFilter"; if (ORTotalFiltersElementType4956 == "TotalFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORTotalFilters.TotalFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for Total VoucherQueryRq.ORTotalFilters.TotalFilter.Total.SetValue(10.01); } if (ORTotalFiltersElementType4956 == "TotalRangeFilter") { //Set field value for FromTotal VoucherQueryRq.ORTotalFilters.TotalRangeFilter.FromTotal.SetValue(10.01); //Set field value for ToTotal VoucherQueryRq.ORTotalFilters.TotalRangeFilter.ToTotal.SetValue(10.01); } string ORTotalQtyFiltersElementType4957 = "TotalQtyFilter"; if (ORTotalQtyFiltersElementType4957 == "TotalQtyFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORTotalQtyFilters.TotalQtyFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for TotalQty VoucherQueryRq.ORTotalQtyFilters.TotalQtyFilter.TotalQty.SetValue(2); } if (ORTotalQtyFiltersElementType4957 == "TotalQtyRangeFilter") { //Set field value for FromTotalQty VoucherQueryRq.ORTotalQtyFilters.TotalQtyRangeFilter.FromTotalQty.SetValue(2); //Set field value for ToTotalQty VoucherQueryRq.ORTotalQtyFilters.TotalQtyRangeFilter.ToTotalQty.SetValue(2); } string ORTxnDateFiltersElementType4958 = "TxnDateFilter"; if (ORTxnDateFiltersElementType4958 == "TxnDateFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORTxnDateFilters.TxnDateFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for TxnDate VoucherQueryRq.ORTxnDateFilters.TxnDateFilter.TxnDate.SetValue(DateTime.Parse("12/15/2007")); } if (ORTxnDateFiltersElementType4958 == "TxnDateRangeFilter") { //Set field value for FromTxnDate VoucherQueryRq.ORTxnDateFilters.TxnDateRangeFilter.FromTxnDate.SetValue(DateTime.Parse("12/15/2007")); //Set field value for ToTxnDate VoucherQueryRq.ORTxnDateFilters.TxnDateRangeFilter.ToTxnDate.SetValue(DateTime.Parse("12/15/2007")); } //Set field value for TxnState VoucherQueryRq.TxnState.SetValue(ENTxnState.tsNormal); string ORVendorCodeFiltersElementType4959 = "VendorCodeFilter"; if (ORVendorCodeFiltersElementType4959 == "VendorCodeFilter") { //Set field value for MatchStringCriterion VoucherQueryRq.ORVendorCodeFilters.VendorCodeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for VendorCode VoucherQueryRq.ORVendorCodeFilters.VendorCodeFilter.VendorCode.SetValue("ab"); } if (ORVendorCodeFiltersElementType4959 == "VendorCodeRangeFilter") { //Set field value for FromVendorCode VoucherQueryRq.ORVendorCodeFilters.VendorCodeRangeFilter.FromVendorCode.SetValue("ab"); //Set field value for ToVendorCode VoucherQueryRq.ORVendorCodeFilters.VendorCodeRangeFilter.ToVendorCode.SetValue("ab"); } //Set field value for VendorListID VoucherQueryRq.VendorListID.SetValue("200000-1011023419"); string ORVoucherNumberFiltersElementType4960 = "VoucherNumberFilter"; if (ORVoucherNumberFiltersElementType4960 == "VoucherNumberFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORVoucherNumberFilters.VoucherNumberFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for VoucherNumber VoucherQueryRq.ORVoucherNumberFilters.VoucherNumberFilter.VoucherNumber.SetValue(6); } if (ORVoucherNumberFiltersElementType4960 == "VoucherNumberRangeFilter") { //Set field value for FromVoucherNumber VoucherQueryRq.ORVoucherNumberFilters.VoucherNumberRangeFilter.FromVoucherNumber.SetValue(6); //Set field value for ToVoucherNumber VoucherQueryRq.ORVoucherNumberFilters.VoucherNumberRangeFilter.ToVoucherNumber.SetValue(6); } //Set field value for VoucherType VoucherQueryRq.VoucherType.SetValue(ENVoucherType.vtReceiving); string ORWorkstationFiltersElementType4961 = "WorkstationFilter"; if (ORWorkstationFiltersElementType4961 == "WorkstationFilter") { //Set field value for MatchNumericCriterion VoucherQueryRq.ORWorkstationFilters.WorkstationFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for Workstation VoucherQueryRq.ORWorkstationFilters.WorkstationFilter.Workstation.SetValue(6); } if (ORWorkstationFiltersElementType4961 == "WorkstationRangeFilter") { //Set field value for FromWorkstation VoucherQueryRq.ORWorkstationFilters.WorkstationRangeFilter.FromWorkstation.SetValue(6); //Set field value for ToWorkstation VoucherQueryRq.ORWorkstationFilters.WorkstationRangeFilter.ToWorkstation.SetValue(6); } //Set field value for IncludeRetElementList //May create more than one of these if needed VoucherQueryRq.IncludeRetElementList.Add("ab"); } void WalkVoucherQueryRs(IMsgSetResponse responseMsgSet) { if (responseMsgSet == null) return; IResponseList responseList = responseMsgSet.ResponseList; if (responseList == null) return; //if we sent only one request, there is only one response, we'll walk the list for this sample for(int i=0; i < responseList.Count; i++) { IResponse response = responseList.GetAt(i); //check the status code of the response, 0=ok, >0 is warning if (response.StatusCode >= 0) { //the request-specific response is in the details, make sure we have some if (response.Detail != null) { //make sure the response is the type we're expecting ENResponseType responseType = (ENResponseType)response.Type.GetValue(); if (responseType == ENResponseType.rtVoucherQueryRs) { //upcast to more specific type here, this is safe because we checked with response.Type check above IVoucherRetList VoucherRet = (IVoucherRetList)response.Detail; for(int z=0; z < VoucherRet.Count; z++) { WalkVoucherRet(VoucherRet.GetAt(z)); } } } } } } void WalkVoucherRet(IVoucherRet VoucherRet) { if (VoucherRet == null) return; //Go through all the elements of IVoucherRetList //Get value of TxnID if (VoucherRet.TxnID != null) { string TxnID4962 = (string)VoucherRet.TxnID.GetValue(); } //Get value of TimeCreated if (VoucherRet.TimeCreated != null) { DateTime TimeCreated4963 = (DateTime)VoucherRet.TimeCreated.GetValue(); } //Get value of TimeModified if (VoucherRet.TimeModified != null) { DateTime TimeModified4964 = (DateTime)VoucherRet.TimeModified.GetValue(); } //Get value of Associate if (VoucherRet.Associate != null) { string Associate4965 = (string)VoucherRet.Associate.GetValue(); } //Get value of Comments if (VoucherRet.Comments != null) { string Comments4966 = (string)VoucherRet.Comments.GetValue(); } //Get value of CompanyName if (VoucherRet.CompanyName != null) { string CompanyName4967 = (string)VoucherRet.CompanyName.GetValue(); } //Get value of Discount if (VoucherRet.Discount != null) { double Discount4968 = (double)VoucherRet.Discount.GetValue(); } //Get value of DiscountPercent if (VoucherRet.DiscountPercent != null) { float DiscountPercent4969 = (float)VoucherRet.DiscountPercent.GetValue(); } //Get value of Fee if (VoucherRet.Fee != null) { double Fee4970 = (double)VoucherRet.Fee.GetValue(); } //Get value of Freight if (VoucherRet.Freight != null) { double Freight4971 = (double)VoucherRet.Freight.GetValue(); } //Get value of HistoryDocStatus if (VoucherRet.HistoryDocStatus != null) { ENHistoryDocStatus HistoryDocStatus4972 = (ENHistoryDocStatus)VoucherRet.HistoryDocStatus.GetValue(); } //Get value of InvoiceDate if (VoucherRet.InvoiceDate != null) { DateTime InvoiceDate4973 = (DateTime)VoucherRet.InvoiceDate.GetValue(); } //Get value of InvoiceDueDate if (VoucherRet.InvoiceDueDate != null) { DateTime InvoiceDueDate4974 = (DateTime)VoucherRet.InvoiceDueDate.GetValue(); } //Get value of InvoiceNumber if (VoucherRet.InvoiceNumber != null) { string InvoiceNumber4975 = (string)VoucherRet.InvoiceNumber.GetValue(); } //Get value of ItemsCount if (VoucherRet.ItemsCount != null) { int ItemsCount4976 = (int)VoucherRet.ItemsCount.GetValue(); } //Get value of PayeeCode if (VoucherRet.PayeeCode != null) { string PayeeCode4977 = (string)VoucherRet.PayeeCode.GetValue(); } //Get value of PayeeListID if (VoucherRet.PayeeListID != null) { string PayeeListID4978 = (string)VoucherRet.PayeeListID.GetValue(); } //Get value of PayeeName if (VoucherRet.PayeeName != null) { string PayeeName4979 = (string)VoucherRet.PayeeName.GetValue(); } //Get value of PurchaseOrderNumber if (VoucherRet.PurchaseOrderNumber != null) { string PurchaseOrderNumber4980 = (string)VoucherRet.PurchaseOrderNumber.GetValue(); } //Get value of PurchaseOrderTxnID if (VoucherRet.PurchaseOrderTxnID != null) { string PurchaseOrderTxnID4981 = (string)VoucherRet.PurchaseOrderTxnID.GetValue(); } //Get value of QuickBooksFlag if (VoucherRet.QuickBooksFlag != null) { ENQuickBooksFlag QuickBooksFlag4982 = (ENQuickBooksFlag)VoucherRet.QuickBooksFlag.GetValue(); } //Get value of StoreExchangeStatus if (VoucherRet.StoreExchangeStatus != null) { ENStoreExchangeStatus StoreExchangeStatus4983 = (ENStoreExchangeStatus)VoucherRet.StoreExchangeStatus.GetValue(); } //Get value of StoreNumber if (VoucherRet.StoreNumber != null) { int StoreNumber4984 = (int)VoucherRet.StoreNumber.GetValue(); } //Get value of Subtotal if (VoucherRet.Subtotal != null) { double Subtotal4985 = (double)VoucherRet.Subtotal.GetValue(); } //Get value of TermsDiscount if (VoucherRet.TermsDiscount != null) { float TermsDiscount4986 = (float)VoucherRet.TermsDiscount.GetValue(); } //Get value of TermsDiscountDays if (VoucherRet.TermsDiscountDays != null) { int TermsDiscountDays4987 = (int)VoucherRet.TermsDiscountDays.GetValue(); } //Get value of TermsNetDays if (VoucherRet.TermsNetDays != null) { int TermsNetDays4988 = (int)VoucherRet.TermsNetDays.GetValue(); } //Get value of Total if (VoucherRet.Total != null) { double Total4989 = (double)VoucherRet.Total.GetValue(); } //Get value of TotalQty if (VoucherRet.TotalQty != null) { int TotalQty4990 = (int)VoucherRet.TotalQty.GetValue(); } //Get value of TxnDate if (VoucherRet.TxnDate != null) { DateTime TxnDate4991 = (DateTime)VoucherRet.TxnDate.GetValue(); } //Get value of TxnState if (VoucherRet.TxnState != null) { ENTxnState TxnState4992 = (ENTxnState)VoucherRet.TxnState.GetValue(); } //Get value of VendorCode if (VoucherRet.VendorCode != null) { string VendorCode4993 = (string)VoucherRet.VendorCode.GetValue(); } //Get value of VendorListID if (VoucherRet.VendorListID != null) { string VendorListID4994 = (string)VoucherRet.VendorListID.GetValue(); } //Get value of VoucherNumber if (VoucherRet.VoucherNumber != null) { int VoucherNumber4995 = (int)VoucherRet.VoucherNumber.GetValue(); } //Get value of VoucherType if (VoucherRet.VoucherType != null) { ENVoucherType VoucherType4996 = (ENVoucherType)VoucherRet.VoucherType.GetValue(); } //Get value of Workstation if (VoucherRet.Workstation != null) { int Workstation4997 = (int)VoucherRet.Workstation.GetValue(); } if (VoucherRet.VoucherItemRetList != null) { for (int i4998 = 0; i4998 < VoucherRet.VoucherItemRetList.Count; i4998++) { IVoucherItemRet VoucherItemRet = VoucherRet.VoucherItemRetList.GetAt(i4998); //Get value of ListID if (VoucherItemRet.ListID != null) { string ListID4999 = (string)VoucherItemRet.ListID.GetValue(); } //Get value of ALU if (VoucherItemRet.ALU != null) { string ALU5000 = (string)VoucherItemRet.ALU.GetValue(); } //Get value of Attribute if (VoucherItemRet.Attribute != null) { string Attribute5001 = (string)VoucherItemRet.Attribute.GetValue(); } //Get value of Cost if (VoucherItemRet.Cost != null) { double Cost5002 = (double)VoucherItemRet.Cost.GetValue(); } //Get value of Desc1 if (VoucherItemRet.Desc1 != null) { string Desc15003 = (string)VoucherItemRet.Desc1.GetValue(); } //Get value of Desc2 if (VoucherItemRet.Desc2 != null) { string Desc25004 = (string)VoucherItemRet.Desc2.GetValue(); } //Get value of ExtendedCost if (VoucherItemRet.ExtendedCost != null) { double ExtendedCost5005 = (double)VoucherItemRet.ExtendedCost.GetValue(); } //Get value of ItemNumber if (VoucherItemRet.ItemNumber != null) { int ItemNumber5006 = (int)VoucherItemRet.ItemNumber.GetValue(); } //Get value of NumberOfBaseUnits if (VoucherItemRet.NumberOfBaseUnits != null) { int NumberOfBaseUnits5007 = (int)VoucherItemRet.NumberOfBaseUnits.GetValue(); } //Get value of OriginalOrderQty if (VoucherItemRet.OriginalOrderQty != null) { int OriginalOrderQty5008 = (int)VoucherItemRet.OriginalOrderQty.GetValue(); } //Get value of QtyReceived if (VoucherItemRet.QtyReceived != null) { int QtyReceived5009 = (int)VoucherItemRet.QtyReceived.GetValue(); } //Get value of SerialNumber if (VoucherItemRet.SerialNumber != null) { string SerialNumber5010 = (string)VoucherItemRet.SerialNumber.GetValue(); } //Get value of Size if (VoucherItemRet.Size != null) { string Size5011 = (string)VoucherItemRet.Size.GetValue(); } //Get value of UnitOfMeasure if (VoucherItemRet.UnitOfMeasure != null) { string UnitOfMeasure5012 = (string)VoucherItemRet.UnitOfMeasure.GetValue(); } //Get value of UPC if (VoucherItemRet.UPC != null) { string UPC5013 = (string)VoucherItemRet.UPC.GetValue(); } } } if (VoucherRet.DataExtRetList != null) { for (int i5014 = 0; i5014 < VoucherRet.DataExtRetList.Count; i5014++) { IDataExtRet DataExtRet = VoucherRet.DataExtRetList.GetAt(i5014); //Get value of OwnerID string OwnerID5015 = (string)DataExtRet.OwnerID.GetValue(); //Get value of DataExtName string DataExtName5016 = (string)DataExtRet.DataExtName.GetValue(); //Get value of DataExtType ENDataExtType DataExtType5017 = (ENDataExtType)DataExtRet.DataExtType.GetValue(); //Get value of DataExtValue string DataExtValue5018 = (string)DataExtRet.DataExtValue.GetValue(); } } } } } |