Adding/Updating Fees in HUD 1200 section

Discussions concerning general integration topics.

Moderator: Phil Barton

chris.brady
Posts: 105
Joined: Wed Oct 17, 2012 4:20 pm

Adding/Updating Fees in HUD 1200 section

Post by chris.brady »

I’m trying to read through the hudlines in the 1200 section of the HUD. I found one other post where another user posted a similar question on how to get at the details for 1202, but the response given (cast the HudLine to IHudLine1200FeeSectionSchedule) exposes different properties all together.

I’ve tried casting the line to IHudLine1200FeeSection to get at the Amount, FeeScheduleType, etc., but I get an error that this is an invalid cast.
Unable to cast object of type 'SoftPro.OrderTracking.Client.HudLineProxy' to type 'SoftPro.OrderTracking.Client.IHudLine1200FeeSection'.

Essentially I want to be able to read 1202, 1204, 1205, and 1206+ to add fees manually. Assuming I’m starting with IHudLine, can you give me a code snippet on how to make this happen? Or if there’s a different section I should be starting from, that would be helpful as well.
neetab
Posts: 22
Joined: Wed Apr 17, 2013 3:20 pm

Re: Adding/Updating Fees in HUD 1200 section

Post by neetab »

Try the following to add or update Fees

IHudLine hudLine = order.HUD[0].GetHudLine(1206);
IHudLine1200FeeSection fs = ((IHudLine1200Section)hudLine).Fee.CreateNew();

you can then set the amount, FeeSchedule like fs.Amount, fs.FeeSchedule.
brian.romero
Posts: 4
Joined: Thu Oct 09, 2014 3:58 pm

Re: Adding/Updating Fees in HUD 1200 section

Post by brian.romero »

For ((IHudLine1200Section)hudLine).Fee.CreateNew():

What would be fieldcode to update create new fee hudlline description (Order.HUDs.Section1200.Charges.Description)
fieldcode for update the create new fee hudline Bill Code (Order.HUDs.Section1200.Charges.BillCode)
and
fieldcode for update the create new fee hudline document type (Order.HUDs.Section1200.Charges.Fees.DocumentType)?
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Adding/Updating Fees in HUD 1200 section

Post by BobRichards »

Can you send me what you have so far?
Bob Richards, Senior Software Developer, SoftPro
Victor.Alexander
Posts: 3
Joined: Tue Nov 18, 2014 2:56 pm

Re: Adding/Updating Fees in HUD 1200 section

Post by Victor.Alexander »

What is the namespace for IHudLine1200Section?
And which version of the SDK is that from?
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Adding/Updating Fees in HUD 1200 section

Post by BobRichards »

Refer the viewtopic.php?f=19&t=711 or search the forum for How do I add lines and charges to HUD lines? topic. There, I give examples of adding lines and charges for the 1100 section. This should help.
Bob Richards, Senior Software Developer, SoftPro
Victor.Alexander
Posts: 3
Joined: Tue Nov 18, 2014 2:56 pm

Re: Adding/Updating Fees in HUD 1200 section

Post by Victor.Alexander »

Thank you very much, Bob!
chris.brady
Posts: 105
Joined: Wed Oct 17, 2012 4:20 pm

Re: Adding/Updating Fees in HUD 1200 section

Post by chris.brady »

Hi Bob,

Your linked post goes into detail on adding charges, which was helpful, but it doesn't give any sample code on how to create a new fee for the Fees collection for the 1200 section.

I've dug through the SDK documentation and the forums, but nothing jumped out at me. Given the uniqueness of 1200, if someone could provide some sample code for accessessing the Fees collection and adding new elements to it, that'd be helpful.
chris.brady
Posts: 105
Joined: Wed Oct 17, 2012 4:20 pm

Re: Adding/Updating Fees in HUD 1200 section

Post by chris.brady »

I still could use additional help creating new hud lines. Based on your example on creating a new line in the 1100 series, you’d have something like:

IOrder order = GetActiveOrder();
Dynamic dOrder = order;

dynamic hud = dorder.HUDs[0];
Dynamic section = hud.Section1100;

var newLine = order.CreateNew(“Hud1100CommonLine”).
Section.Add(newLine);
newline.Number = 1109;

Does this “CommonLine” hardcoded value apply to the entire HUD when creating a new line? In other words, to create a new line in the 1300 series, we’d just replace 1100 with 1300 in the statement above (“Hud1300CommonLine”)?

What would the code look like to create an additional charge line? Are we just adding to the Section1100.Charges collection, or is it the Hud.Lines.Charges collection? Using the code above, we’ve created a new line and numbered it 1109. Now I need to create 4 additional charges to add to 1109. What would the code look like for this? Is there a newline.CreateNew() extension, or is there another hardcoded value, like order.CreateNew(“Hud1100AdditionalCharge”) that I need to know?

The real squirrelly part is how to handle the 1200 section. I could use an example for
• Adding a new 1200 line
• Adding an additional charge to this new 1200 line
• Adding fees to this new line (I was going to send field codes for Fees for quick reference, but they aren’t visible to me in the field code browser).

In Boylan, there was some casting going on (e.g. casting an IHudLine to IHudLine1200Section), so I’m concerned about tackling this particular section by myself without guidance. We’ll need to be able to set fee schedule types, amounts, number of pages, Document Types, Bill Codes, and Payee information (in particular, the IsSeparateCheck flag).

I attempted to add screenshots showing which field codes we want to populate, but to no avail. I haven't been able to add screenshots for well over a year.
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Adding/Updating Fees in HUD 1200 section

Post by BobRichards »

To access a default HUD Line and set fee information:

Code: Select all

// Get a HUD line
dynamic hud = order.HUDs[0];
dynamic line = hud.Lines[1202];

//There is always one charge by default
dynamic charge = line.Charges[0];
dynamic fee = charge.Fees[0];
fee.FeeScheduleType = FeeScheduleType.CityCountyTaxStamps
fee.Amount = 2.50M;
Sometimes you may need to add a additional charges beyond the first one to the default HUD lines. You need to first get the HUD line, create a new instance of that charge type, and then add the charge to the Charges collection for that line. (But remember you always have that first charge provided for you.)

Code: Select all

dynamic line = hud.Lines[1202];
dynamic firstCharge = line.Charges[0];
dynamic secondCharge = order.CreateNew(“HUD1202Charge”);
line.Charges.Add(secondCharge);
Certain HUD lines are provided when an order is created and are referred to as "default HUD Lines" (for instance, lines 1201-1205). You are free to use the remaining lines as follows:

To add a new line and a new charge on that line. When adding a new line to a section, it will always be a HUD***CommonLine. For example HUD800CommonLine, HUD900CommonLine, HUD1300CommonLine.

Code: Select all

dynamic hud = order.HUDs[0];
dynamic line = order.CreateNew(“HUD1200CommonLine”)

// Add the line to the order since it is not provided by default.
hud.Section1200.Add(line);
dynamic firstCharge = line.Charges[0]

// To set data on first charge
dynamic secondCharge = order.CreateNew(“HUD1200CommonCharge”);

// Add additional charges since only one charge is provided by default.
line.Charges.Add(secondCharge);
//set data on second charge here
There are a few (common sense) caveats to adding lines and charges:
  • A HUD section may not have an unlimited number of lines in a HUD section. This maximum number of lines depends on the HUD section.
  • Some lines are not allowed to have more than one charge.
Bob Richards, Senior Software Developer, SoftPro
Post Reply