Back to forum list… Back to How Do I?...

Prevent Sage 300 from auto-shipping (6 replies)

Jay C
8 years ago
Jay C 8 years ago

I'm working on a Shopify integration with a Sage 300 company that has the option "Invoice will be produced" set to yes.  Whereas this is a convenient option for busy clerks doing data entry (it saves them from checking a box), it has a side effect.  If there is a miscellaneous charge on the order, e.g., shipping costs, when iMan imports the order, it automatically does a shipment, because the check box turns on automatically.

When I write my own Sage programs in VB or C#, to prevent a shipment, I do something like this to set the INVPRODUCE flag to zero:

if OEOrderHeader.Fields("ordlines") > 0 And (bHasMisc Or bHasShip) Then

     OEOrderHeader.Fields("invproduce") = 0

     OEOrderHeader.Fields("oecommand") = 4

End If

Yes, I'm able to map a field in iMan that sets INVPRODUCE to 0, that's easy.  Unfortunately, if there's not a miscellaneous charge on the order, I get an error that "read-only field INVPRODUCE cannot be modified". 

So my question is, how can create a conditional mapping, so that INVPRODUCE is only set when there's a shipping charge?  Do I need to create separate paths in the Transform setup?

Support
8 years ago
Support 8 years ago

Jay, on your detail line setup a field called 'IsShippingCharge', set it's type to integer. In the field set a formula such as:

IIf(%LINETYPE = 2, 1, 0)

Where LINETYPE is the field to trigger a miscellaneous charge line.

In your header to check if your detail fields have any miscellaneous lines use the Sum function:

Sum("IsShippingCharge", "OrderDetails") > 0

Hope this helps.

Jay C
8 years ago
Jay C 8 years ago

I'm not clear.  I can create the formulas, but how/where do I use the header formula?  Note that there's a field in the header called "shipping_price" that tells me if there's a misc charge, so I don't think I need a detail formula.

D Dunn
8 years ago
D Dunn 8 years ago

@Support: The challenge is that Sage will produce an error if you attempt to change that field's value if there is nothing shipable on the order.  Jay's asking if there is a way to not touch the field at all or if there a way to instruct IMan not to touch the field because it is marked as read-only and avoid invoking the error.

@Jay - I think you'd have to have two paths; one for orders with shipping charges and one for without.

Jay C
8 years ago
Jay C 8 years ago

Thanks, Django, that was my intuition, too.

Jay C
8 years ago
Jay C 8 years ago

Yep, the filter worked.  But when I added a new filter, I get this error when I save:

The maximum number of connectors for job [5] has been exceeded. Your license permits only [4] connectors per job.

Fortunately, I have a spare job licence, so I'll add it as a separate job.

D Dunn
8 years ago
D Dunn 8 years ago

As an aside what I've done for my Shopify import was to pull the data into an intermediary database using DBWriter and ODBC.  Then I have a VBA macro read the data from those tables to import my orders.  That's not the 'ideal' use of IMan's abilities and functionality but it also gives me 100% control over the process. You and I can write macros/VB programs which not all IMan users have the staff/training/desire to do.

Contact

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Request Demo

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Access Downloads

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close