AnsweredAssumed Answered

Merge Field Displays Incorrect Information

Question asked by chawks1995 on Mar 8, 2012
Latest reply on Mar 8, 2012 by chawks1995

Title

Merge Field Displays Incorrect Information

Post

Hello All,

 

I have a strange problem that I haven't been able to figure out:

I have an order form layout which is only used in 'Preview' mode. This order form has several merge fields that display common items such as:

Non-Taxable Sales

Taxable Sales

Sub-Total ... etc.

 

The calculated field in my Orders Table that manages the calculation of the 'Non-Taxable' sales total works great, but the 'Taxable' sales total field does something funny. If there are no 'Taxable' line items on the order it displays the value of the 'Non-Taxable' sales total but only on the layout which is only shown in 'Preview' mode - this layout is of course the one that the user prints the order from at the end of the order entry process. However, even though the 'Taxable' sales total merge field field mirrors the value of the 'Non-Taxable' sales total the 'Total Value' or the order is not affected - it displays the correct amount of the order.

There is a further twist to this story. If an order DOES have taxable line items then the 'Non-Taxable' sales total merge field displays the correct value on the aforementioned layout in 'Preview' mode and the 'Total Value' displays the correct amount too. You are good to go!

Example1: Non-Taxable Sales Only - All fields are merge fields:

Line Item    Item    Description            Value   Taxable

1                LBR     Design Labor          $90.00   No

Non-Taxable Sales: $90.00

Taxable-Sales: $90.00 <- No Good :(

Order Total: $90.00

 

Example2: Non-Taxable & Non-Taxable Sales - All fields are merge fields:

Line Item    Item    Description            Value   Taxable

1                LBR     Design Labor          $90.00   No

2                MAT     Plotting Paper         $60.00   Yes

Non-Taxable Sales: $90.00

Taxable-Sales: $60.00

Order Total: $150.00  [It Works!]

-------------------------------------------

Here are my Fields and corresponding calculations - aslo, attached is a brief mock-up of my basic order table structure:

 

MATERIALS TABLE
------------------------------------------
Item_TaxableStatus (Number Field)


ORDER_LINEITEM TABLE
------------------------------------------
zTaxableAmount Calculated Field:
Calculation: If ( Item_TaxableStatus = 1 ; zz_ExtendedPrice ; 0 )

zNonTaxableAmount Calculated Field:
Calculation: If ( Item_TaxableStatus= 0 ; zz_ExtendedPrice ; 0 )

ORDERS TABLE
------------------------------------------
zTotalTaxableAmount Calculated Field:
Calculation: Round ( Sum ( Order_LINEITEM::zTaxableAmount ) ; 2 )

zTotalNonTaxableAmount Calculated Field:
Calculation: Round ( Sum ( Order_LINEITEM::zNonTaxableAmount ) ; 2 )

 

Thanks in advance to the community for helping me with this interesting problem!!

 

chawks1995

3/5/2012

 

FM1.jpg

Outcomes