This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var textBytes = Encoding.UTF8.GetBytes("Hello world!"); | |
// after: 72 101 108 108 111 32 119 111 114 108 100 33 | |
var base64String = Convert.ToBase64String(textBytes, 6, 6); | |
// after: d29ybGQh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "xxxxx", | |
"rowNumber": 1, | |
"InventoryID": { | |
"error": "'Inventory ID' cannot be empty." | |
}, | |
"UOM": { | |
"error": "'UOM' cannot be empty." | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "xxxxx", | |
"rowNumber": 1, | |
"note": { | |
"value": "" | |
}, | |
"error": "Unit conversion is missing.; Unit conversion is missing.", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Test error when inventory is missing from Acumatica | |
/// when adding order | |
/// </summary> | |
[Fact] | |
public void OrderMissingInventoryTest() | |
{ | |
try | |
{ | |
string createdOrder = service.AddOrder(Properties.Resources.OrderMissingInventory); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public UnitTestOrder(ITestOutputHelper output) | |
{ | |
this.output = output; | |
var config = new ConfigurationBuilder() | |
.SetBasePath(Directory.GetCurrentDirectory()) | |
.AddUserSecrets<UnitTestOrder>() | |
.AddEnvironmentVariables() | |
.Build(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Update price and repair item type when inventory ID of repair item | |
//is updated. | |
protected void _(Events.FieldUpdated<RSSVRepairItem, | |
RSSVRepairItem.inventoryID> e) | |
{ | |
RSSVRepairItem row = e.Row; | |
if (row.InventoryID != null && row.RepairItemType == null) | |
{ | |
//Use the PXSelector attribute to select the stock item. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"TaxDetails": [ | |
{ | |
"id": "bc0fc7b0-ce58-47eb-a1cf-dba9eee671aa", | |
"rowNumber": 1, | |
"note": null, | |
"TaxableAmount": { | |
"value": 0.0000 | |
}, | |
"TaxAmount": { | |
"value": 0.0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void SetSOHeaderObjectsData(PrepareAndImportOrdersParams orderParams) | |
{ | |
SOOrder newOrder = new SOOrder(); | |
if (orderParams.objSOOrderEntry.sosetup.Current != null) | |
{ | |
if (orderParams.objSOAmazonSetup.GuestCustID.HasValue) | |
{ | |
newOrder.OrderType = orderParams.objSOAmazonSetup.OrderType; | |
newOrder = (SOOrder)orderParams.objSOOrderEntry.Document.Cache.Insert(newOrder); | |
newOrder.CustomerID = orderParams.objSOAmazonSetup.GuestCustID; |