﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="UnitTestsDocumentation.xsl"?>
<members version="25.4.34.0">
    <UnitTest Name="Procedures_ComputeEstimates_Allowed1Allowed2">
        <TestNum>1</TestNum>
        <VersionAdded>7.1</VersionAdded>
        <Description>Patient has two insurance plans, both PPO, subscriber self for both. The only benefit entered for both insurance plans is 50% coverage on the crowns category. One procedure is treatment planned, a D2750 PFM crown on #8. COB is Basic; see Tests 17 and 18 for other COB types. If the three fees are entered for each scenario, then the estimates and writeoffs shown in the Treatment Plan module will be:<br/>
        <table>
          <tr>
            <td>Fee</td>
            <td>Allowed1</td>
            <td>Allowed2</td>
            <td>InsPay1</td>
            <td>InsPay2</td>
            <td>Writeoff1</td>
            <td>Writeoff2</td>
            <td>(implied pat port)</td>
          </tr>
          <tr>
            <td>$1,200.00</td>
            <td>$900.00</td>
            <td>$650.00</td>
            <td>$450.00</td>
            <td>$200.00</td>
            <td>$300.00</td>
            <td>$0.00</td>
            <td>$250.00</td>
          </tr>
        </table>
</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_ZeroCoverageOverAnnualMax">
        <TestNum>3</TestNum>
        <VersionAdded>7.1</VersionAdded>
        <Description>Patient has one insurance plan, category percentage, subscriber self. Benefits include annual max of 1000, crowns 100%, Diagnostic 100%, BW frequency: every 1 year. Two procedures are treatment planned: a crown for $1100, going over the annual max, and a 4BW D0274. The 4BW must show zero coverage.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_FamilyUnderAnnualMax">
        <TestNum>4</TestNum>
        <VersionAdded>7.1</VersionAdded>
        <Description>2 patients in one family. Same insurance. The only benefits are: $1000 individual annual max, $2500 family annual max, and 100% crowns. Add a crown for $830. Crown should show insurance estimate of $830 with no comment about 'over annual max'.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_IndividualAndFamilyMax">
        <TestNum>5</TestNum>
        <VersionAdded>7.1</VersionAdded>
        <Description>2 patients in one family. Same insurance. The only benefits are: $1000 individual annual max, $2500 family annual max, and 100% crowns. Add an insurance used amount of $2000 to one patient. Then have one TP procedure on the other patient, a crown for $830. The insurance on the second patient should show an estimate of $500 due to family max.</Description>
    </UnitTest>
    <UnitTest Name="InsPlan_GetInsUsedDisplay_LimitationsOverride">
        <TestNum>6</TestNum>
        <VersionAdded>7.1</VersionAdded>
        <Description>Patient has one insurance plan, subscriber self. Benefits: annual max 1000, diagnostic max 1000. First completed procedure, an exam for $50, insurance paid $50.  Second procedure, a crown for $830, insurance paid $400. Ins used should show $400 and should not include the $50 because the ins used value should only be concerned with amounts that affect the annual max .</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_PreventitiveDiagnosticDeductibleOnlyOnce">
        <TestNum>7</TestNum>
        <VersionAdded>7.2</VersionAdded>
        <Description>1 patient. 1 insplan, 6 benefits: 1000 annual max, 100% preventive, 100% diagnostic, $50 deduct general, $25 deduct preventive, and $25 deduct diagnostic. One TP procedure for $60, code D0120 (perExam). Second TP procedure for $70, code D1110 (prophy). Second procedure should show no deductible. This is because we need to treat the $25 deductible as a single deductible that applies to preventive/diagnostic. It's not two deductibles. This is only a temporary solution, and the better solution will be to support code ranges that include both preventive and diagnostic, and then to enter a single $25 deductible for that range.</Description>
    </UnitTest>
    <UnitTest Name="Claims_CalculateAndUpdate_Allowed1Allowed2CompletedProcedures">
        <TestNum>8</TestNum>
        <VersionAdded>7.2</VersionAdded>
        <Description>Patient has two insurance plans, both PPO, subscriber self for both. The only benefits entered for both insurance plans are $1000 max and 50% coverage on the crowns category.  One procedure is treatment planned, a D2750 PFM crown on #8. The three fee schedules are set up as below. The procedure is completed and a primary claim is created. The claim should show a writeoff of $500.       <br/>
				<table>
          <tr>
            <td>Fee</td>
            <td>Allowed1</td>
            <td>Allowed2</td>
            <td>InsPay1</td>
            <td>InsPay2</td>
            <td>Writeoff1</td>
            <td>Writeoff2</td>
            <td>(implied pat port)</td>
          </tr>
          <tr>
            <td>$1,200.00</td>
            <td>$600.00</td>
            <td>$800.00</td>
            <td>$300.00</td>
            <td>$400.00</td>
            <td>$500.00</td>
            <td>$0.00</td>
            <td>$0.00</td>
          </tr>
        </table>
			</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_LimitationsOverrideGeneralLimitations">
        <TestNum>9</TestNum>
        <VersionAdded>7.2.39</VersionAdded>
        <Description> Related to #6. Patient has one insurance plan, subscriber self. Benefits: annual max $200. Other benefit added for limitation on D2161 of $2000. Restorative 80%. Two procedures are treatment planned. First is D2161 for $300, insurance estimate of $240. Second procedure is a D2160 for $300. Insurance estimate on second procedure in the TP should be $200 because the first procedure does not count towards the regular annual max. It instead has its own annual max.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_AnnualMaxReachedZeroCoverage">
        <TestNum>10</TestNum>
        <VersionAdded>7.2.43</VersionAdded>
        <Description>(this tests the case where preventive frequency is causing errors in the calculation) Patient has one insurance plan, subscriber self. Benefits: annual max $400. 100% coverage on routine preventive. Limitation, preventive every 2 years. Three space maintainers (D1515) added to TP, $500 each. First proc should show $400 coverage, and second proc $0 coverage.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_FamilyMaxNoIndividualMax">
        <TestNum>11</TestNum>
        <VersionAdded>7.5.5</VersionAdded>
        <Description>Patient has one insurance plan, subscriber self. Benefits: annual family max $400. No individual max. 100% coverage on restorative. Two amalgams added to TP, $500 each. First proc should show $400 coverage, and second proc $0 coverage.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_WriteoffPPOsPriSecSamePlan">
        <TestNum>12</TestNum>
        <VersionAdded>7.8.16</VersionAdded>
        <Description>Patient has spouse.  Both have insurance with the same PPO plan.  The patient has secondary insurance  through the spouse.  Benefits: annual max $1200. Deductible $0.  100% coverage on a crown.  One crown added to TP for $1400.  Allowed $1100.<br/>
				<table>
          <tr>
            <td>Fee</td>
            <td>Allowed1</td>
            <td>Allowed2</td>
            <td>InsPay1</td>
            <td>InsPay2</td>
            <td>Writeoff1</td>
            <td>Writeoff2</td>
            <td>(implied pat port)</td>
          </tr>
          <tr>
            <td>$1,400.00</td>
            <td>$1100.00</td>
            <td>$1100.00</td>
            <td>$1100.00</td>
            <td>$0.00</td>
            <td>$300.00</td>
            <td>$0.00</td>
            <td>$0.00</td>
          </tr>
        </table>
			</Description>
    </UnitTest>
    <UnitTest Name="InsPlan_GetInsUsedDisplay_OrthoProcsNotAffectInsUsed">
        <TestNum>13</TestNum>
        <VersionAdded>7.9.9</VersionAdded>
        <Description>Patient has one insurance plan, subscriber self. Benefits: annual max $100, ortho max $500, 100% on diagnostic and ortho.  2 procs: D0140 (limEx) $59, and D8090 (comprehensive ortho) $348. Each sent to ins on separate claim, received, paid 100%.  Insurance used should show $59.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_PriEstNotAffectedBySecClaim">
        <TestNum>14</TestNum>
        <VersionAdded>11.0.27</VersionAdded>
        <Description>Patient has 2 PPO insurance plans, subscriber self for both. Each plan has benefits: annual max $1200, 80% coverage on restorative. 1 proc: D2160 amalg on #19, $1279 status of TP. Allowed1=$1279, allowed2=$110. Proc set complete, attached to primary claim and secondary claim. Primary estimate should be $1023.20.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_DeductibleOverrides">
        <TestNum>15</TestNum>
        <VersionAdded>7.0</VersionAdded>
        <Description>Not version specific; it has always worked this way. The reason for adding this unit test was to ensure that it keeps working.<br/>
Patient has one insurance plan, subscriber self. Benefits: annual max $1000, deductible $50, 100% coverage on preventive/diagnostic/xray, $0 deductible on preventive/diagnostic/xray, 80% coverage on all 4 general categories, 1 manually entered benefit for $45 deductible on code D0330 pano. First TP proc is D0330 for $95, second TP proc is D2150 on #30 for $200. In TP module, $45 deductible shows on the D0330, and a $5 deductible shows on the D2150.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_CategoryDeductiblesShouldNotExceedRegularDeductible">
        <TestNum>16</TestNum>
        <VersionAdded>11.1.3</VersionAdded>
        <Description>Patient has one insurance plan, subscriber self. Benefits: annual max $1000, deductible $50, 100% coverage on preventive/diagnostic/xray, $0 deductible on preventive/diagnostic/xray, 80% coverage on all 4 general categories, 1 manually entered benefit for $45 deductible on code D0330, $25 deductible on D0220, add treatment plannned procedure D0330 fee $100, D0220 fee $75. In TP module, $45 deductible should show on D0330, and $5 on D0220.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_COBStandardTwoPPOs">
        <TestNum>17</TestNum>
        <VersionAdded>12.0</VersionAdded>
        <Description>  Patient has two insurance plans, both PPO, subscriber self for both. The only benefit entered for both insurance plans is 50% coverage on the crowns category.  One procedure is treatment planned, a D2750 PFM crown on #8. This table shows two different fee schedule scenarios.<br/>
        <table>
          <tr>
            <td>#</td>
            <td>Fee</td>
            <td>Allowed1</td>
            <td>Allowed2</td>
            <td>InsPay1</td>
            <td>InsPay2</td>
            <td>Writeoff1</td>
            <td>Writeoff2</td>
            <td>(implied pat port)</td>
          </tr>
          <tr>
            <td>1</td>
            <td>$1,200.00</td>
            <td>$900.00</td>
            <td>$650.00</td>
            <td>$450.00</td>
            <td>$325.00</td>
            <td>$300.00</td>
            <td>$0.00</td>
            <td>$125.00</td>
          </tr>
          <tr>
            <td>2</td>
            <td>$1,200.00</td>
            <td>$650.00</td>
            <td>$900.00</td>
            <td>$325.00</td>
            <td>$325.00</td>
            <td>$550.00</td>
            <td>$0.00</td>
            <td>$0.00</td>
          </tr>
        </table>
			</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_COBCarveOutCategoryPercentagePlan">
        <TestNum>18</TestNum>
        <VersionAdded>12.0</VersionAdded>
        <Description>Patient has two insurance plans, subscriber self for both. Plan 1 has 50% coverage on the crowns category and plan 2 has 75% coverage. One procedure is treatment planned, a D2750 PFM crown on #8 for $1200. Primary estimate should be $600, and secondary $300.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_MultipleDeductibles">
        <TestNum>19</TestNum>
        <VersionAdded>12.0</VersionAdded>
        <Description><table>
          <tr>
            <td>Fee</td>
            <td>Ded1</td>
            <td>Est1</td>
            <td>PatPort1</td>
            <td>Ded2</td>
            <td>Est2</td>
            <td>patient out of pocket</td>
          </tr>
          <tr>
            <td>$150.00</td>
            <td>$50.00</td>
            <td>$50.00</td>
            <td>$100.00</td>
            <td>$50.00</td>
            <td>$50.00</td>
            <td>$50.00</td>
          </tr>
        </table>
        Patient has <br/>
          two insurance plans, subscriber self for both. Both plans standard COB. Both plans have diagnostic 50% and a $50 general deductible. A limited exam, D0120 is treatment planned for $150. Primary estimate is calculated as (150-50) x 0.5 = $50. Secondary estimate with standard COB is the lesser of:<br/>
          1. The amount that it would have paid in the absence of any other coverage. (150-50) x 0.5 = $50<br/>
          2. The patient's portion under the primary plan. $100<br/>
          So $50.  <br/>
           Patient out of pocket = 150 - 50 - 50 = 50.</Description>
    </UnitTest>
    <UnitTest Name="InsPlan_GetDedRemainDisplay_IndividualAndFamilyDeductiblesInsRemaining">
        <TestNum>20</TestNum>
        <VersionAdded>12.1</VersionAdded>
        <Description>Three patients, all with the same insurance plan. Guarantor is subscriber. $75 individual deductible, $150 family deductible. Patient 3 has a $75 insurance adjustment for a previously applied deductible. Patient 2 has a procedure D2750 for $1280 that has been paid, including a deductible of $50. Patient 1, the guarantor, has a procedure treatment planned, D4355 for $135. In the guarantor's TP module, at the lower right, the deductible remaining should be $25. An internal test is also performed to verify that if the family deductible were ignored, that the deductible remaining would show $75.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_DeductiblesForProcsNotCovered">
        <TestNum>21</TestNum>
        <Description>Patient has one insurance plan, subscriber self. Benefits: annual max $1000, deductible $50. One treatment plannned procedure D0120 fee $55. In the TP module, deductible should be $0.</Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateDailyOvertime_WithSplitBreak">
        <TestNum>24</TestNum>
        <VersionAdded>12.3</VersionAdded>
        <Description>There is an overtime rule for the employee for  more than 10 hours per day. Option is on to adjust if breaks over 30  minutes. The employee had a break of 40 minutes and should be adjusted accordingly. Because the break is split into the employee's two shifts, the adjustment will happen on the second shift as the last 10 minutes of break time occurred then. Previously called Legacy Test 24. Push the Calc Daily button. 10:00 of regular time.<br/>
<table>
  <tr>
    <td colspan='3'>Scenario</td>
    <td colspan='2'>Results</td>
    <td></td>
  </tr>
  <tr>
    <td>TimeDisplayed1</td>
    <td>TimeDisplayed2</td>
    <td>ClockStatus</td>
    <td>AdjustAuto</td>
    <td>OtimeAuto</td>
    <td>Calc. Len.</td>
  </tr>
  <tr>
    <td>08:00:00 AM</td>
    <td>01:00:00 PM</td>
    <td>Lunch</td>
    <td></td>
    <td></td>
    <td>5:00</td>
  </tr>
  <tr>
    <td>10:00:00 AM</td>
    <td>10:20:00 AM</td>
    <td>break</td>
    <td></td>
    <td></td>
    <td>0:20</td>
  </tr>
  <tr>
    <td>02:00:00 PM</td>
    <td>09:00:00 PM</td>
    <td>Home</td>
    <td>-00:10:00</td>
    <td>01:50:00</td>
    <td >7:00</td>
  </tr>
  <tr>
    <td>04:00:00 PM</td>
    <td>4:20:00 PM</td>
    <td>break</td>
    <td></td>
    <td></td>
    <td>0:20</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_DuringNormalWorkWeek">
        <TestNum>25</TestNum>
        <VersionAdded>12.3</VersionAdded>
        <Description>Work week is entirely within the same pay  period. Push the Calc Week OT button.<br/>
<table>
  <tr>
    <td colspan='3'>Scenario</td>
    <td colspan='2'>Results</td>
    <td></td>
  </tr>
  <tr>
    <td>TimeDisplayed1</td>
    <td>TimeDisplayed2</td>
    <td>ClockStatus</td>
    <td>AdjustAuto</td>
    <td>OtimeAuto</td>
    <td>Calc. Len.</td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
</table>
<table>
  <tr>
    <td colspan='4'>Results (TimeAdjust Entry)</td>
  </tr>
  <tr>
    <td>TimeEntry</td>
    <td>RegHours</td>
    <td>OtimeHours</td>
    <td>IsAuto</td>
  </tr>
  <tr>
    <td>8:00 PM</td>
    <td>-4:00</td>
    <td>4:00</td>
    <td>true</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_OneWeekOverTwoPayPeriods">
        <TestNum>26</TestNum>
        <VersionAdded>12.3</VersionAdded>
        <Description>Work week is split  between two pay periods<br/>
	While viewing the first pay period, push the  Calc Week OT button. View the second pay period, and push the Calc Week OT button.<br/>
<table>
  <tr>
    <td colspan='3'>Scenario</td>
    <td colspan='2'>Results</td>
    <td></td>
  </tr>
  <tr>
    <td>TimeDisplayed1</td>
    <td>TimeDisplayed2</td>
    <td >ClockStatus</td>
    <td>AdjustAuto</td>
    <td>OtimeAuto</td>
    <td>Calc. Len.</td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
  <tr>
    <td colspan='5'><strong>Start of new pay period.</strong></td>
    <td></td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
</table>
<table>
  <tr>
    <td colspan='4'>Results (TimeAdjust Entry)</td>
  </tr>
  <tr>
    <td>TimeEntry</td>
    <td>RegHours</td>
    <td>OtimeHours</td>
    <td>IsAuto</td>
  </tr>
  <tr>
    <td>8:00 PM</td>
    <td>-4:00</td>
    <td>4:00</td>
    <td>true</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_OneWeekWorkWeekStartsOnWednesday">
        <TestNum>27</TestNum>
        <VersionAdded>12.3</VersionAdded>
        <Description>The work week starts on  Wednesday. Push the Calc Daily button, then push the Calc Week OT  button.<br/>
<table>
  <tr>
    <td colspan='3'>Scenario</td>
    <td colspan='2'>Results</td>
    <td></td>
  </tr>
  <tr>
    <td>TimeDisplayed1</td>
    <td>TimeDisplayed2</td>
    <td>ClockStatus</td>
    <td>AdjustAuto</td>
    <td>OtimeAuto</td>
    <td>Calc. Len.</td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td> </td>
    <td> </td>
    <td>11:00</td>
  </tr>
  <tr>
    <td colspan='5'>Wednesday, start of new work week.</td>
    <td></td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
  <tr>
    <td>06:00:00 AM</td>
    <td>05:00:00 PM</td>
    <td>Home</td>
    <td></td>
    <td></td>
    <td>11:00</td>
  </tr>
</table>
<table>
  <tr>
    <td colspan='4'>Results (TimeAdjust Entry)</td>
  </tr>
  <tr>
    <td>TimeEntry</td>
    <td>RegHours</td>
    <td>OtimeHours</td>
    <td>IsAuto</td>
  </tr>
  <tr>
    <td>8:00 PM</td>
    <td>-4:00</td>
    <td>4:00</td>
    <td>true</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClaimProcs_FormClaimProc_TextBoxValuesFromChartModule">
        <TestNum>28</TestNum>
        <VersionAdded>12.3</VersionAdded>
        <Description><table>
  <tr>
    <td>Proc</td>
    <td>Fee</td>
    <td>Ded</td>
    <td>Est</td>
    <td>PatPort</td>
  </tr>
  <tr>
    <td>1</td>
    <td>$800.00</td>
    <td>$25.00</td>
    <td>$387.50</td>
    <td>$412.50</td>
  </tr>
  <tr>
    <td>2</td>
    <td>$800.00</td>
    <td>$0.00</td>
    <td>$400.00</td>
    <td>$400.00</td>
  </tr>
</table>
The patient has one insurance plan, category percentage, subscriber self. Benefits: annual max $1300, 50% coverage on crowns, and a $25 general deductible. Both TP procs are crowns, first TP proc is D2790  for $800 on #1 with priority 1, second TP proc is D2790 on #9 for $800 with priority 2. First, the estimates are pre-calculated by visiting the TP module. Then, when opening a procedure from Chart Module, followed by opening the claimproc from inside of the Edit Procedure window, the amounts must match those listed in the table above. This unit test is the first one that looks at the values showing in the claimproc window.  This catches situations where the only &quot;bug&quot; is just a display issue in that window.</Description>
    </UnitTest>
    <UnitTest Name="ClaimProcs_FormClaimProc_TextBoxValuesFromClaimEditWindow">
        <TestNum>29</TestNum>
        <VersionAdded>12.3</VersionAdded>
        <Description><table>
  <tr>
    <td>Proc</td>
    <td>Fee</td>
    <td>Ded</td>
    <td>Est</td>
    <td>PatPort</td>
  </tr>
  <tr>
    <td>1</td>
    <td>$800.00</td>
    <td>$25.00</td>
    <td>$387.50</td>
    <td>$412.50</td>
  </tr>
  <tr>
    <td>2</td>
    <td>$800.00</td>
    <td>$0.00</td>
    <td>$400.00</td>
    <td>$400.00</td>
  </tr>
</table>
The patient has one insurance plan, category percentage, subscriber self. Benefits: annual max $1300, 50% coverage on crowns and a $25 general deductible. Both complete crowns are on the same claim, first proc is D2790  for $800 on #1, second proc is D2790 on #9 for $800. The claimproc estimates are calculated when the claim is created. Then, when opening a claimproc from inside of the Edit Claim window, the amounts must match those listed in the table above.</Description>
    </UnitTest>
    <UnitTest Name="ClaimProcs_FormClaimProc_TextBoxValuesFromTreatPlanModule">
        <TestNum>30</TestNum>
        <VersionAdded>12.3</VersionAdded>
        <Description><table>
  <tr>
    <td>Proc</td>
    <td>Fee</td>
    <td>Ded</td>
    <td>Est</td>
    <td>PatPort</td>
  </tr>
  <tr>
    <td>1</td>
    <td>$800.00</td>
    <td>$25.00</td>
    <td>$387.50</td>
    <td>$412.50</td>
  </tr>
  <tr>
    <td>2</td>
    <td>$800.00</td>
    <td>$0.00</td>
    <td>$400.00</td>
    <td>$400.00</td>
  </tr>
</table>
The patient has one insurance plan, category percentage, subscriber self. Benefits: annual max $1300, 50% coverage on crowns and a $25 general deductible. <span> Both TP procs are crowns, first TP proc is D2790  for $800 on #1 with priority 1, second TP proc is D2790 on #9 for $800 with priority 2.</span> First, the estimates are pre-calculated by visiting the TP module. Then, when opening a procedure from TP Module, followed by opening the claimproc from inside of the Edit Procedure window, the amounts must match those listed in the table above.</Description>
    </UnitTest>
    <UnitTest Name="InsPlan_GetPendingDisplay_LimitationsOverrideGeneralLimitations">
        <TestNum>31</TestNum>
        <VersionAdded>12.3.45</VersionAdded>
        <Description>Patient has one insurance plan, subscriber self.  Benefits: annual max $1000. Other benefit added for limitation on routine preventive of $1000. Routine preventive 100%. A prophy D1110 for $125 is complete, attached to a claim, with insurance estimate of $125 and a claimproc status of NotReceived. Pending insurance at the lower right of the TP module  should be $0 because the procedure does not count towards the regular annual max. It instead has its own annual max.</Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateDailyOvertime_ForHoursWorkedAfterACertainTime">
        <TestNum>32</TestNum>
        <Description>There is a special rule that allows for overtime for time worked after 4pm. This employee works from 8am-4:40pm with a 40 minute break in between. With the adjust for breaks over 30 minutes set, when calculating overtime, there is a 10 minute adjustment for the breakand 40 minutes of overtime for the time worked after 4pm. Previously called Legacy Test 32.</Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateDailyOvertime_ForHoursWorkedBeforeACertainTime">
        <TestNum>33</TestNum>
        <Description>There is a special rule that allows for overtime for time worked before 7:30am. This employee works from 6am-4pm with a 40 minute break in between. With the adjust for breaks over 30 minutes set, when calculating overtime, there is a 10 minute adjustment for the break and 90 minutes of overtime for the time worked before 7:30am. Previously called Legacy Test 33.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_GeneralDeductiblesConsideredWithProcedureSpecificDeductibles">
        <TestNum>34</TestNum>
        <VersionAdded>12.3.45</VersionAdded>
        <Description>Validates that procedure specific deductibles take general deductibles into consideration.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_GetDeductibleByCode_InsuranceAdjustmentDeductible">
        <TestNum>35</TestNum>
        <VersionAdded>14.3.28</VersionAdded>
        <Description>  Patient has one insurance plan, subscriber self, category percentage.  Benefits: Diagnostic 80%, General Deductible $50.  One TP procedure: D0120 perExam $200.  InsPlan adjustment: $50 deductible.  In the TP module, the proc should show that the patient owes $0 on the deductible.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_COBStandardDualPPOWriteoffZero">
        <TestNum>36</TestNum>
        <VersionAdded>14.3</VersionAdded>
        <Description>Similar to unit test 17. Ensures that the secondary writeoff is zero when the primary writeoff is zero.<br/>
Patient has two insurance plans, both PPO with Standard COB rule, subscriber self for both.  The primary insurance covers 50% perio and secondary covers 80% perio.  One perio procedure is treatment planned, a D4341 scaling &amp; root planing, any quadrant.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_PPOProceduresMultipleUnits">
        <TestNum>37</TestNum>
        <VersionAdded>15.2</VersionAdded>
        <Description>Patient has one PPO insurance plan, subscriber self.  The insurance covers 80% Diagnostic, and has a $10 individual general deductible.  The insurance plan has a copay of $5 and an allowed amount of $40 for procedure code D0270.  One procedure is complete, a D0270 single bitewing.  The procedure unit quantity is 3.  The fee for each D0270 is $50.<br/>
<table>
  <tr>
    <td>Copay</td>
    <td>Deduct</td>
    <td>Fee</td>
    <td>Allowed</td>
    <td>InsEst</td>
    <td>Writeoff</td>
    <td>PatientPortion</td>
  </tr>
  <tr>
    <td>5*3=15</td>
    <td>10 </td>
    <td>50*3=150</td>
    <td>40*3=120</td>
    <td>95*0.8=76</td>
    <td>150-120=30</td>
    <td>150-76-30=44</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_CategoryPercentageProceduresMultipleUnits">
        <TestNum>38</TestNum>
        <VersionAdded>15.2</VersionAdded>
        <Description>Patient has one Category Percentage insurance plan, subscriber self.  The insurance covers 80% Diagnostic.  One procedure is complete, a D0270 single bitewing.  The procedure unit quantity is 2.  The fee for each D0270 is $50.<br/>
<table>
  <tr>
    <td>Fee</td>
    <td>InsEst</td>
  </tr>
  <tr>
    <td>50*2=100</td>
    <td>100*0.8=80</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_PPOProceduresMultipleUnitsWriteoff">
        <TestNum>39</TestNum>
        <VersionAdded>15.2</VersionAdded>
        <Description>Patient has two PPO Percentage plans, both plans with subscriber self.  Both primary and secondary cover 80% Diagnostic.  The primary insurance plan has an allowed amount of $40 for a D0270 and the secondary plan has an allowed amount of $30 for a D0270.  One procedure is treatment planned, a D0270 single bitewing.  The procedure unit quantity is 4.  The fee for each D0270 is $50.<br/>
<table>
  <tr>
    <td>Fee</td>
    <td>Allowed1</td>
    <td>Allowed2</td>
    <td>InsPay1</td>
    <td>InsPay2</td>
    <td>Writeoff1</td>
    <td>Writeoff2</td>
  </tr>
  <tr>
    <td>50*4=200 </td>
    <td>40*4=160</td>
    <td>30*4=120</td>
    <td>160*0.8=128</td>
    <td>0</td>
    <td> 200-160=40</td>
    <td>0</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_InsPPOsecWriteoffsPreference">
        <TestNum>40</TestNum>
        <VersionAdded>15.2</VersionAdded>
        <Description>Patient has a Category Percentage primary insurance plan and PPO secondary plan with Basic COB rule, both plans with subscriber self.  Primary covers 80% Diagnostic, secondary covers 100% Diagnostic.  The primary insurance has a general deductible of $50 and an allowed amount of $152 for a treatment planned D0272 two bitewings procedure, and secondary has an allowed amount of $87.99 for D0272.  The fee on the treatment planned D0272 is $236.<br/>
<table>
  <tr>
    <td>Fee</td>
    <td>Deduct</td>
    <td>Allowed1</td>
    <td>Allowed2</td>
    <td>InsPay1</td>
    <td>InsPay2</td>
    <td>Writeoff1</td>
    <td>Writeoff2</td>
    <td>PatPortion</td>
  </tr>
  <tr>
    <td>236</td>
    <td>50</td>
    <td>152</td>
    <td>87.99</td>
    <td>(152-50)*0.8+81.6</td>
    <td>87.99-81.6=6.39</td>
    <td>0</td>
    <td>236-81.60-6.39+148.01</td>
    <td>0</td>
  </tr>
</table>
The preference used in this unit test is not recommended and is rarely used.<br/>
The preference is documented on <a href='../manual/modulesetupfamily.html'>Family Module Preferences</a>.<br/>
If instead the preference was off for this unit test, then Writeoff2 would have been 0 and the Pat Portion would have been 148.01.<br/>
</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_Init_CorrectlyOrderedAutoSplits">
        <TestNum>41</TestNum>
        <Description>Make sure auto splits that are created are in the correct number and order (earliest proc paid first).</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_Init_CorrectlyOrderedAutoSplitsWithExistingPayment">
        <TestNum>42</TestNum>
        <Description>Make sure auto splits are created in correct number and order with an existing payment already present.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_Init_AutoSplitOverAllocation">
        <TestNum>43</TestNum>
        <Description>Make sure if existing procedures are overpaid with an unallocated payment that an additional payment doesn't autosplit to the procs.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_Init_AutoSplitForPaymentNegativePaymentAmount">
        <TestNum>44</TestNum>
        <Description>Make sure if a payment is created for negative amount that it makes no auto splits.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_Init_AutoSplitWithAdjustmentAndExistingPayment">
        <TestNum>45</TestNum>
        <Description>Make sure auto splits take into account unallocated adjustment, an overpayment on a procedure, and are attributed correctly to the remaining procedure with an unallocated split for the rest.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_Init_AutoSplitForPaymentNegativePaymentAmountNegProcedure">
        <TestNum>46</TestNum>
        <Description>Make sure if there is a negative procedure and a negative payment amount that a new payment goes fully to unallocated.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_Init_AutoSplitProcedureGuarantor">
        <TestNum>47</TestNum>
        <Description>Make sure auto split suggestions go to the correct patients, for the correct amounts.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_Init_AutoSplitWithClaimPayments">
        <TestNum>48</TestNum>
        <Description>Make sure auto split suggestions take into account claim payments on procedures.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_OverrideUnderFamilyMaxEstimateNote">
        <TestNum>49</TestNum>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_OverrideOverFamilyMaxEstimateNote">
        <TestNum>50</TestNum>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_MedicalDeductible">
        <TestNum>51</TestNum>
    </UnitTest>
    <UnitTest Name="SignatureBoxWrapper_FillSignature_GetNumberOfTabletPoints">
        <TestNum>52</TestNum>
    </UnitTest>
    <UnitTest Name="Legacy_TestFiftyThree">
        <TestNum>53</TestNum>
        <Description>Tests that repeat charges are added correctly after the stop date.<br/>
<br/>
		Scenario #1: The start day is before the stop day which is before the billing day. Start 12/08/2015, Stop 12/09/2015. Add a charge on 11/11/2015 and 12/11/2015.<br/>
<br/>
		Scenario #2: The start day is after the billing day which is after the stop day. Start 11/25/2015, Stop 12/01/2015. Add a charge on 12/11/2015.<br/>
<br/>
		Scenario #3: The start day is the same as the stop day but before the billing day. Start 11/10/2015, Stop 12/10/2015. Add a charge on 11/11/2015 and 12/11/2015.<br/>
<br/>
		Scenario #4: The start day is the same as the stop day and the billing day. Start 10/11/2015, Stop 11/11/2015. Add a charge on 11/11/2015.<br/>
<br/>
		Scenario #5: The start day is after the stop day which is after the billing day. Start 10/15/2015, Stop 11/13/2015. Add a charge on 11/11/2015.<br/>
<br/>
		Scenario #6: The start day is before the billing day which is before the stop day. Start 10/05/2015, Stop 11/20/2015. Add a charge on 11/11/2015.</Description>
    </UnitTest>
    <UnitTest Name="Legacy_TestFiftyFour">
        <TestNum>54</TestNum>
        <Description>Tests that deleting a charge does not cause the wrong charges to be added back.<br/>
<br/>
		Scenario #1: Add three repeating charges with a start date of 11/01/2015 and an amount of $100 with a note of 'Charge #1','Charge #2', and 'Charge #3' respectively. Run repeating charge tool. Delete all the procedures with a date of 11/11/2015.Run repeating charge tool. Result should be a procedure with a billing note of 'Charge #1', a procedure with a billing note of 'Charge #2', a procedure note of 'Charge #3' on 11/11/2015, and a procedure with a billing note of 'Charge #1', a procedure with a billing note of 'Charge #2', and a procedure with a billing note of 'Charge #3' on 12/11/2015. <br/>
		<br/>
		Scenario #2: Add three repeating charges with a start date of 11/01/2015 and an amount of $100 with a note of 'Charge #1', 'Charge #2', and 'Charge #3', respectively. Run repeating charge tool. Delete all the procedures with a date of 12/11/2015. Run repeating charge tool. Result should be a procedure with a billing note of 'Charge #1', a procedure with a billing note of 'Charge #2', a procedure with a billing note of 'Charge #3' on 11/11/2015, and a procedure with a billing note of 'Charge #1', a procedure with a billing note of 'Charge #2', and a procedure with a billing note of 'Charge #3' on 12/11/2015. <br/>
		<br/>
		Scenario #3: Add three repeating charges with a start date of 11/01/2015 and an amount of $100 with a note of 'Charge #1', 'Charge #2', and 'Charge #3' respectively. Run repeating charge tool. Delete one procedure with a date of 11/11/2015. Run repeating charge tool. Result should be a procedure with a billing note of 'Charge #1', a procedure with a billing note of 'Charge #2', a procedure with a billing note of 'Charge #3' on 11/11/2015, and a procedure with a billing note of 'Charge #1', a procedure with a billing note of 'Charge #2', a procedure with	a billing note of 'Charge #3' on 12/11/2015</Description>
    </UnitTest>
    <UnitTest Name="Legacy_TestFiftyFive">
        <TestNum>55</TestNum>
        <Description>Tests that changing the amount or start date on a repeat charge does not cause an additional one to be added.<br/>
<br/>
		Scenario #1: Add a repeating charge with a start date of 11/01/2015 and an amount of $100. Run repeating charge tool. Change the amount of the repeating charge $80. Run repeating charge tool. Result should be a procedure of amount $100 on 11/11/2015 and a procedure of amount $100 on 12/11/2015.<br/>
<br/>
		Scenario #2: Add a repeating charge with a start date of 11/01/2015 and an amount of $100. Run repeating charge tool. Start date of the	repeating charge to 11/02/2015. Run repeating charge tool. Result should be a procedure of amount $100 on 11/11/2015 and a procedure of amount $100 on 12/11/2015.</Description>
    </UnitTest>
    <UnitTest Name="Legacy_TestFiftySix">
        <TestNum>56</TestNum>
        <Description>Tests that repeat charges are not posted before the start date.<br/>
<br/>
		Scenario #1: Add a repeat charge with a start date of 12/15/2015. Set the billing cycle day to 15. Run repeating charge tool. Result should be a procedure on 12/15/2015.<br/>
<br/>
		Scenario #2: Add a repeat charge with a start date of 12/15/2015. Set the billing cycle day to 12. Run repeating charge tool. Result should be no procedure added.<br/>
<br/>
		Scenario #3: Add a repeat charge with a start date of 12/18/2015. Set the billing cycle day to 15. Run repeating charge tool. Result should be no procedure added.</Description>
    </UnitTest>
    <UnitTest Name="Fees_GetFee_ProviderSpecificFees">
        <TestNum>57</TestNum>
        <Description>Fees logic: #1: For PPOInsPlan1, Dr. Jones, Dr. Smith, and Dr. Wilson have different fees.</Description>
    </UnitTest>
    <UnitTest Name="Fees_GetFee_ClinicSpecificFees">
        <TestNum>58</TestNum>
        <Description>Fees logic: #2: Clinic A, B, and C have different standard UCR fees.</Description>
    </UnitTest>
    <UnitTest Name="Fees_GetFee_ClinicAndProviderSpecificFees">
        <TestNum>59</TestNum>
        <Description>Fees logic: #3: Dr. Jane and Dr. George have different standard UCR fees. Dr. George's works in two clinics (A and B),and his standard fees are different depending on the clinic.</Description>
    </UnitTest>
    <UnitTest Name="Claims_CalculateAndUpdate_ProcedureCodeDowngradeBlankFee">
        <TestNum>60</TestNum>
        <Description>Downgrade insurance estimates #1. The PPO fee schedule has a blank fee for the downgraded code.</Description>
    </UnitTest>
    <UnitTest Name="Claims_CalculateAndUpdate_ProcedureCodeDowngradeHigherFee">
        <TestNum>61</TestNum>
        <Description>Downgrade insurance estimates #2. The PPO fee schedule has a higher fee for the downgraded code than for the original code.</Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_ForDifferentClinics">
        <TestNum>62</TestNum>
        <Description>Tests clinic-specific overtime hour adjustments for a single work period. Previously called Legacy Test 62.</Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_OneWeekOverTwoPayPeriodsForDifferentClinics">
        <TestNum>63</TestNum>
        <Description>Tests clinic-specific overtime hour adjustments for work week spanning two pay periods. Previously called Legacy Test 63.</Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_OneWeekOverTwoPayPeriodsForDifferentClinicPreferences">
        <TestNum>64</TestNum>
        <Description>Tests clinic-specific overtime hour adjustments for work week spanning two pay periods and expecting adjustments for multiple clinics. Previously called Legacy Test 64.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_MedicalFlatCopaySecondaryFeeSchedule">
        <TestNum>65</TestNum>
        <Description>A patient has Medicaid/FlatCopay as secondary insurance. It should use its own fee schedule when calculating its coverage.</Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_ForDifferentClinicsRealData">
        <TestNum>66</TestNum>
        <Description>Tests a normal work week with a start of the week in the previous pay period with break adjustments. Previously called Legacy Test 66.<br/>
		Note: This unit test was based on real data from a real set of timecard entries.</Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_CalculationWithManualOvertime">
        <TestNum>67</TestNum>
        <Description>Test work week with manual overtime hours. Previously called Legacy Test 67.<br/>
		Note: This unit test was based on real data from a real set of timecard entries including dates, timespans, and the like.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_CategoryPercentageCanadianLabFees">
        <TestNum>73</TestNum>
    </UnitTest>
    <UnitTest Name="Benefits_GetAnnualMaxDisplay_CalendarYearBenefit">
        <TestNum>74</TestNum>
        <Description>This Unit Test mimics an old bug scenario</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_OrthoMaxSeparateFamilyAndIndividualMaxes">
        <TestNum>75</TestNum>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_OrthoFamilyMaxOverLargerIndividual">
        <TestNum>76</TestNum>
    </UnitTest>
    <UnitTest Name="Appointments_GetApptTimePatternFromProcPatterns_PatternLogic">
        <TestNum>79</TestNum>
        <Description>Testing appointment time pattern logic.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_DeductiblesDualInsuranceNotNegative">
        <TestNum>80</TestNum>
        <Description>Making sure that deductible estimates from both insurances are not applied to the same procedure when calculating deductibles for subsequent procedures.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_FrequencyLimitationMet">
        <TestNum>81</TestNum>
        <Description>Makes sure that if two claimprocs are created for the same frequency limitation group and one is marked received, the estimate claimproc will show as 0 coverage because the limitation is met.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_MultipleProceduresOneClaimExceedAnnualMax">
        <TestNum>83</TestNum>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_COBCarveOutSecondaryInsurance">
        <TestNum>84</TestNum>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_SalesTaxCalculation_EstimateWriteOff">
        <TestNum>86</TestNum>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_CategoryDeductiblesShouldNotExceedRegularDeductibleClaim">
        <TestNum>100</TestNum>
        <VersionAdded>21.1</VersionAdded>
        <Description>The patient has one insurance plan with general deductible of $50, 100% coverage on Diagnostic, and a $10 xray deductible. We treatment plan the patient for a cleaning (D0110) and an xray (D0220). The cleaning is estimated to take up $40 of the patient's deductible and the xray is estimated to take up $10 of the patient's deductible. We mark the cleaning complete and leave the xray treatment planned. A claim for the cleaning is submitted, and the deductible comes out to $50. This means that, even though the patient has a $10 xray deductible,they have already hit their max deductible for the year and should owe nothing. The xray deductible estimate is $0.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_CategoryDeductiblesDontExceedLimits">
        <TestNum>101</TestNum>
        <VersionAdded>21.1.8</VersionAdded>
        <Description>The patient has one insurance plan with general deductible of $100, 100% coverage on Diagnostic, and a $50 xray deductible. We treatment plan the patient for two xrays (D0330 and D0220). The estimate is calculated and shows that we expect the patient to pay $25 for one xray and $25 for another, hitting their xray deductible. We set one xray complete and create a claim which will require  the patient pay their max xray deductible of $50. Finally, we treatment plan a cleaning procedure, complete it, and submit a claim. The deductible comes out to $50. This means that this $50 that went towards their xray deductible also goes towards their general deductible. XRay: &#x09; $50 deductible&#x09;&#x09;-&#x09; $50 patient portion paid &#x09; = &#x09; $0 owed for patient's other xray General:&#x09; $100 deductible &#x09;-&#x09; $50 xray deductible met &#x09; = &#x09; $50 owed for the patient's general deductible</Description>
    </UnitTest>
    <UnitTest Name="AccountEntry_MultipleAdjustments_ConsiderPatPayments">
        <TestNum>102</TestNum>
        <VersionAdded>21.1</VersionAdded>
        <Description>In the 'Add Multiple Adjustments' window, we have a procedure that costs $200. The patient makes a $20 payment and insurance is estimated to cover $30. If the office goes to make an adjustment,this should be calculated based off the remaining balance of the procedure, which will be $150.</Description>
    </UnitTest>
    <UnitTest Name="ClaimProcs_ApplyAsTotalPayment_InsuranceEstimateGreaterThanFeeBilled">
        <TestNum>103</TestNum>
        <VersionAdded>21.1</VersionAdded>
        <Description>Patient has Category Percentage primary insurance, subscriber self. The 'Claim Pay by Total splits automatically' preference is enabled. Two procedures are Tp'd, D0220 with procedure fee of $100 and D0150 with a fee of $25. Both procedures are covered at 100%. A Pre-Auth is sent and received with the insurance estimated to cover $125 on D0220. Complete both procedures and send a claim. Receiving the claim and clicking the Pay as Total button should correctly apply the $125 between both procedures.</Description>
    </UnitTest>
    <UnitTest Name="ClaimProcs_ApplyAsTotalPayment_TotalAmtPaidGreaterThanTotalProcFees">
        <TestNum>104</TestNum>
        <VersionAdded>21.1</VersionAdded>
        <Description>Patient has Category Percentage primary insurance, subscriber self. The 'Claim Pay by Total splits automatically' preference is enabled. Two procedures are Tp'd, D0220 with procedure fee of $100 and D0150 with a fee of $25. Both procedures are covered at 100%. A Pre-Auth is sent and received with the insurance estimated to cover $135 on D0220. Complete both procedures and send a claim. Receiving the claim and clicking the Pay as Total button should correctly apply the $125 between both procedures and the overpayment of $10 should be applied to the first procedure on the claim.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_BalanceAndIncomeTransfer_PayPlansOverpaidInterest">
        <TestNum>105</TestNum>
        <VersionAdded>21.2</VersionAdded>
        <Description>Patient has a 'Patient Payment Plan' for $100 with 20% APR and an amortization schedule composed of 10 payments of which the first month of charges will be due today. All payment plan charges are attached to a procedure that is worth $200. The first month of payment plan charges due will be $10.94 of which $9.27 is principal and $1.67 is interest. The patient will make a payment of $30.94 which overpays the current amount due by $20. The payment will be made with two payment splits, one for the $9.27 in principal and one for $21.67 in interest. Running an income transfer after creating the payment should move the $20 of overpaid interest to unearned and then from unearned directly to the procedure because the payment plan does not cover the entire procedure amount.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_GetIncomeTransferSplitsFIFO_SuggestImplicitTransfers">
        <TestNum>106</TestNum>
        <VersionAdded>21.3</VersionAdded>
        <Description>Patient has 3 procedures for 3 different providers on 3 different days. The 1st procedure is for provider #1 and is dated 01/01/2021 for $10. The 2nd procedure is for provider #2 and is dated 02/02/2021 for $20. The 3rd procedure is for provider #3 and is dated 03/03/2021 for $30. The patient made 2 payments to unearned. The 1st unearned payment is associated to provider #3 and is dated 01/01/2021 for $30. The 2nd unearned payment is associated to provider #2 and is dated 02/02/2021 for $20. Running a FIFO income transfer should take money from unearned and apply it directly to all of the 1st and 2nd procedures and a partial amount to the 3rd procedure leaving it wanting $10.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_GetIncomeTransferSplitsFIFO_DoNotTransferImplicitlyLinkedIncome">
        <TestNum>107</TestNum>
        <VersionAdded>21.3</VersionAdded>
        <Description>Patient has 2 procedures for 2 different providers on 2 different days. The 1st procedure is for provider #1 and is dated 01/01/2021 for $10. The 2nd procedure is for provider #2 and is dated 02/02/2021 for $20. The patient made 2 payments. The 1st payment is associated to provider #2 and the 1st procedure and is dated 01/01/2021 for $10. The 2nd payment is associated to provider #1 and the 2nd procedure and is dated 02/02/2021 for $20. Running a FIFO income transfer should do nothing because patient, provider, and clinic mismatches are ignored and the procedures are paid in full.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_GetIncomeTransferSplitsFIFO_ImplicitlyTransferOverpayments">
        <TestNum>109</TestNum>
        <VersionAdded>21.3</VersionAdded>
        <Description>Patient has 2 procedures for 2 different providers on 2 different days. The 1st procedure is for provider #1 and is dated 01/01/2021 for $10. The 2nd procedure is for provider #2 and is dated 02/02/2021 for $20. The patient made 2 payments. The 1st payment is associated to provider #2 and the 1st procedure and is dated 01/01/2021 for $10. The 2nd payment is associated to provider #1 and the 1st procedure and is dated 02/02/2021 for $20. Running a FIFO income transfer should allow transferring the $10 away from the 1st procedure to the 2nd procedure.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_GetIncomeTransferSplitsFIFO_UnearnedOffsets">
        <TestNum>110</TestNum>
        <VersionAdded>21.3</VersionAdded>
        <Description>Patient has 1 procedure for provider #1 dated 01/01/2021 for $100. The patient has 2 unearned payments on the account. The 1st unearned payment is associated to provider #2 and is dated 01/01/2021 for $20. The 2nd unearned payment is associated to provider #1 and is dated 02/02/2021 for ($20). Running a FIFO income transfer should do nothing because there is technically no unearned money to allocate.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_GetIncomeTransferSplitsFIFO_InsurancePaymentPlan">
        <TestNum>111</TestNum>
        <VersionAdded>21.3</VersionAdded>
        <Description>Patient has 2 procedures for the different providers on the same day. The 1st procedure is for $500 and has an insurance estimate of $400. The 2nd procedure is for $500 and has an insurance estimate of $300. An insurance payment plan is created for the estimated total of both procedures, $700. An unearned payment is made for $1,000. At this point, the 1st procedure on needs $100 and the 2nd procedure only needs $200 since the insurance payment plan should take care of the rest. FIFO logic should allow transferring $100 away from unearned to the 1st procedure and $200 from unearned to the 2nd procedure.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_ConstructAndLinkChargeCredits_MismatchedOffsettingAdjustments">
        <TestNum>112</TestNum>
        <VersionAdded>20.5.66</VersionAdded>
        <Description>Patient has 1 procedure for the first provider for $200. The procedure has 2 adjustments attached. Both adjustments are for provider 2 which makes them incorrectly linked to the procedure. However, the 1st adjustment is for $300 and the 2nd adjustment is for ($300) which means that they should offset each other. The current account should reflect the procedure wanting $200 and both adjustments should be set to $0 because they technically offset.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_ConstructAndLinkChargeCredits_DynamicPayPlanInterestCharge">
        <TestNum>113</TestNum>
        <VersionAdded>21.2.27</VersionAdded>
        <Description>When a user creates a Dynamic Payment Plan, with attached production, payments can be made Explicitly or Implicitly linked to either one or both. In the event that the user wishes to create offsetting payments that do not Explicitly link to production, we want to be certain the Dynamic Payment Plan is not overpaid. We also do not want to allow money to be taken directly from production. If a user creates a Dynamic Payment Plan for Patient Joe, giving the plan a 5 APR and a Procedure with a total cost of $100, they may choose to pay the first payment's principal first using the following Paysplits:<br/>
<table>
	<tr>
		<td><b>Patient</b></td>
		<td><b>PayPlan</b></td>
		<td><b>Procedure</b></td>
		<td><b>Amt Paid</b></td>
		<td><b>PayPlanChargeType</b></td>
		<td><b>Notes</b></td>
	</tr>
	<tr>
		<td>Joe</td>
		<td>X</td>
		<td>X</td>
		<td>99.58</td>
		<td>Principal</td>
		<td>Payment on Payplan</td>
	</tr>
	<tr>
		<td>Joe</td>
		<td>X</td>
		<td>X</td>
		<td>99.58</td>
		<td>Unknown</td>
		<td>Income Transfer on Payplan with Procedure attached</td>
	</tr>
	<tr>
		<td>Joe</td>
		<td>X</td>
		<td></td>
		<td>-99.58</td>
		<td>Unknown</td>
		<td>Income Transfer on Payplan without Procedure attached</td>
	</tr>
</table>
This can cause the Dynamic Payment Plan to be considered overpaid since we are Explicitly adding money to it and the attached production but Implicitly removing money from the plan itself. OpenDental should see these splits and calculate that two of them are intended offsets which should net to 0. The resulting Account Entries should look like:<br/>
<table>
	<tr>
		<td><b>Patient</b></td>
		<td><b>PayPlan</b></td>
		<td><b>Procedure</b></td>
		<td><b>AmtEnd</b></td>
		<td><b>AmtPrincipal</b></td>
		<td><b>AmtInterest</b></td>
		<td><b>Type</b></td>
	</tr>
	<tr>
		<td>Joe</td>
		<td></td>
		<td>X</td>
		<td>0</td>
		<td>0</td>
		<td>0</td>
		<td>Procedure</td>
	</tr>
	<tr>
		<td>Joe</td>
		<td>X</td>
		<td>X</td>
		<td>0</td>
		<td>99.58</td>
		<td>0</td>
		<td>Principal</td>
	</tr>
	<tr>
		<td>Joe</td>
		<td>X</td>
		<td></td>
		<td>0.42</td>
		<td>0</td>
		<td>0.42</td>
		<td>Interest</td>
	</tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_ConstructAndLinkChargeCredits_OffsettingUnattachedAdjustments">
        <TestNum>114</TestNum>
        <VersionAdded>21.2.32</VersionAdded>
        <Description>Patient has 1 procedure for $200. The procedure has no adjustments explicitly attached. Two unattached adjustments are for the same patient, provider, and clinic which makes them candidates to offset each other. The 1st adjustment is for $100 and the 2nd adjustment is for ($100). The current account should reflect the procedure wanting $200 and both adjustments should be set to $0 because they technically offset.</Description>
    </UnitTest>
    <UnitTest Name="InsPlans_ComputeEstimates_ZeroWriteoffOverAnnualMaxGlobalLevel">
        <TestNum>115</TestNum>
        <VersionAdded>22.3</VersionAdded>
        <Description>Patient has one insurance plan, PPO, subscriber self. Global preference to zero out write-offs when annual max is entirely exceeded is set to true, plan override is set to default. Benefits include annual max of 100, crowns 90%. Three procedures are treatment planned: all crowns for $110, the second procedure causes the account to go over the annual max, and the third will then completely exceed the annual max resulting in a $0 writeoff. The third TP must recieve no estimated write off.<br/>
<table>
  <tr>
    <td><b>Procedure</b></td>
    <td><b>Fee</b></td>
    <td><b>Ins Pay Est.</b></td>
    <td><b>Write-off</b></td>
    <td><b>Pat portion</b></td>
  </tr>
  <tr>
    <td>1</td>
    <td>$110.00</td>
    <td>$81.00</td>
    <td>$20.00</td>
    <td>$9.00</td>
  </tr>
  <tr>
    <td>2</td>
    <td>$110.00</td>
    <td>$19.00</td>
    <td>$20.00</td>
    <td>$71.00</td>
  </tr>
  <tr>
    <td>3</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$0.00</td>
    <td>$110.00</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="InsPlans_ComputeEstimates_ZeroWriteoffOverAnnualMaxPlanLevel">
        <TestNum>116</TestNum>
        <VersionAdded>22.3</VersionAdded>
        <Description>Patient has one insurance plan, PPO, subscriber self. Global preference to zero out write-offs when annual max is entirely exceeded is set to false, plan override is set to true. Benefits include annual max of 100, crowns 90%. Three procedures are treatment planned: all crowns for $110, the second procedure causes the account to go over the annual max, and the third will then completely exceed the annual max resulting in a $0 writeoff. The third TP must recieve no estimated write off.<br/>
<table>
  <tr>
    <td><b>Procedure</b></td>
    <td><b>Fee</b></td>
    <td><b>Ins Pay Est.</b></td>
    <td><b>Write-off</b></td>
    <td><b>Pat portion</b></td>
  </tr>
  <tr>
    <td>1</td>
    <td>$110.00</td>
    <td>$81.00</td>
    <td>$20.00</td>
    <td>$9.00</td>
  </tr>
  <tr>
    <td>2</td>
    <td>$110.00</td>
    <td>$19.00</td>
    <td>$20.00</td>
    <td>$71.00</td>
  </tr>
  <tr>
    <td>3</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$0.00</td>
    <td>$110.00</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="InsPlans_ComputeEstimates_ZeroWriteoffOverAnnualMaxPlanLevelWhenDeductibleEqualsProcFeeAllowedAndAnnualMaxMet">
        <TestNum>116</TestNum>
        <VersionAdded>22.3</VersionAdded>
        <Description>Patient has one insurance plan, PPO, subscriber self. Global preference to zero out write-offs when annual max is entirely exceeded is set to false, plan override is set to true. Benefits include annual max of 90, crowns 100%. Three procedures are treatment planned: all crowns for $110, the second procedure causes the account to go over the annual max, and the third will then completely exceed the annual max resulting in a $0 writeoff. Also there is a deductible that will completely cover the first procedure. That procedure must not zero out the write-off.<br/>
<table>
  <tr>
    <td><b>Procedure</b></td>
    <td><b>Fee</b></td>
    <td><b>Ins Pay Est.</b></td>
    <td><b>Write-off</b></td>
    <td><b>Pat portion</b></td>
  </tr>
  <tr>
    <td>1</td>
    <td>$110.00</td>
    <td>$0</td>
    <td>$20.00</td>
    <td>$90.00</td>
  </tr>
  <tr>
    <td>2</td>
    <td>$110.00</td>
    <td>$90</td>
    <td>$20</td>
    <td>$0</td>
  </tr>
  <tr>
    <td>3</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$0.00</td>
    <td>$110.00</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="InsPlans_ComputeEstimates_ZeroWriteoffOverAnnualMaxGlobalLevelOff">
        <TestNum>117</TestNum>
        <VersionAdded>22.3</VersionAdded>
        <Description>Patient has one insurance plan, PPO, subscriber self. Global preference to zero out write-offs when annual max is entirely exceeded is set to false, plan override is set to default. Benefits include annual max of 100, crowns 90%. Three procedures are treatment planned: all crowns for $110, the second procedure causes the account to go over the annual max, and the third will then completely exceed the annual max. The third TP must recieve the same estimated write off as the previous two TP's.<br/>
<table>
  <tr>
    <td><b>Procedure</b></td>
    <td><b>Fee</b></td>
    <td><b>Ins Pay Est.</b></td>
    <td><b>Write-off</b></td>
    <td><b>Pat portion</b></td>
  </tr>
  <tr>
    <td>1</td>
    <td>$110.00</td>
    <td>$81.00</td>
    <td>$20.00</td>
    <td>$9.00</td>
  </tr>
  <tr>
    <td>2</td>
    <td>$110.00</td>
    <td>$19.00</td>
    <td>$20.00</td>
    <td>$71.00</td>
  </tr>
  <tr>
    <td>3</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$20.00</td>
    <td>$90.00</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="InsPlans_ComputeEstimates_ZeroWriteoffOverFrequencyGlobalLevel">
        <TestNum>118</TestNum>
        <VersionAdded>22.3</VersionAdded>
        <Description>Patient has one insurance plan, PPO, subscriber self. Global preference to zero out write-offs when frequency or aging is entirely exceeded is set to true, plan override is set to default. Benefits include frequency limitation of 2 crowns, crowns 90%. Three procedures are treatment planned: all crowns for $110, the third procedure causes the account to go over the frequency limitation The third TP must recieve a $0 estimated write off.<br/>
<table>
  <tr>
    <td><b>Procedure</b></td>
    <td><b>Fee</b></td>
    <td><b>Ins Pay Est.</b></td>
    <td><b>Write-off</b></td>
    <td><b>Pat portion</b></td>
  </tr>
  <tr>
    <td>1</td>
    <td>$110.00</td>
    <td>$81.00</td>
    <td>$20.00</td>
    <td>$9.00</td>
  </tr>
  <tr>
    <td>2</td>
    <td>$110.00</td>
    <td>$81.00</td>
    <td>$20.00</td>
    <td>$9.00</td>
  </tr>
  <tr>
    <td>3</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$0.00</td>
    <td>$110.00</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="InsPlans_ComputeEstimates_ZeroWriteoffOverFrequencyPlanLevel">
        <TestNum>119</TestNum>
        <VersionAdded>22.3</VersionAdded>
        <Description>Patient has one insurance plan, PPO, subscriber self. Global preference to zero out write-offs when frequency or aging is entirely exceeded is set to false, plan override is set to true. Benefits include frequency limitation of 2 crowns, crowns 90%. Three procedures are treatment planned: all crowns for $110, the third procedure causes the account to go over the frequency limitation The third TP must recieve a $0 estimated write off.<br/>
<table>
  <tr>
    <td><b>Procedure</b></td>
    <td><b>Fee</b></td>
    <td><b>Ins Pay Est.</b></td>
    <td><b>Write-off</b></td>
    <td><b>Pat portion</b></td>
  </tr>
  <tr>
    <td>1</td>
    <td>$110.00</td>
    <td>$81.00</td>
    <td>$20.00</td>
    <td>$9.00</td>
  </tr>
  <tr>
    <td>2</td>
    <td>$110.00</td>
    <td>$81.00</td>
    <td>$20.00</td>
    <td>$9.00</td>
  </tr>
  <tr>
    <td>3</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$0.00</td>
    <td>$110.00</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="InsPlans_ComputeEstimates_ZeroWriteoffOverFrequencyGlobalLevelOff">
        <TestNum>120</TestNum>
        <VersionAdded>22.3</VersionAdded>
        <Description>Patient has one insurance plan, PPO, subscriber self. Global preference to zero out write-offs when frequency or aging is entirely exceeded is set to false, plan override is set to default. Benefits include frequency limitation of 2 crowns, crowns 90%. Three procedures are treatment planned: all crowns for $110, the third procedure causes the account to go over the frequency limitation The third TP must recieve a $20 estimated write off.<br/>
<table>
  <tr>
    <td><b>Procedure</b></td>
    <td><b>Fee</b></td>
    <td><b>Ins Pay Est.</b></td>
    <td><b>Write-off</b></td>
    <td><b>Pat portion</b></td>
  </tr>
  <tr>
    <td>1</td>
    <td>$110.00</td>
    <td>$81.00</td>
    <td>$20.00</td>
    <td>$9.00</td>
  </tr>
  <tr>
    <td>2</td>
    <td>$110.00</td>
    <td>$81.00</td>
    <td>$20.00</td>
    <td>$9.00</td>
  </tr>
  <tr>
    <td>3</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$20.00</td>
    <td>$90.00</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="InsPlans_ComputeEstimates_ZeroWriteoffOverAgingGlobalLevel">
        <TestNum>121</TestNum>
        <VersionAdded>22.3</VersionAdded>
        <Description>Patient has one insurance plan, PPO, subscriber self. Global preference to zero out write-offs when frequency or aging is entirely exceeded is set to true, plan override is set to default. Benefits include aging limitation of 26 year olds, crowns 90%. Three procedures are treatment planned: all crowns for $110, for the second and third procedure the patient age will go over the aging limitation. The third and second TP must recieve a $0 estimated write off.<br/>
<table>
  <tr>
	<td><b>Patient Age</b></td>
    <td><b>Procedure</b></td>
    <td><b>Fee</b></td>
    <td><b>Ins Pay Est.</b></td>
    <td><b>Write-off</b></td>
    <td><b>Pat portion</b></td>
  </tr>
  <tr>
	<td>25</td>
    <td>1</td>
    <td>$110.00</td>
    <td>$81.00</td>
    <td>$20.00</td>
    <td>$9.00</td>
  </tr>
  <tr>
	<td>26</td>
    <td>2</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$0.00</td>
    <td>$110.00</td>
  </tr>
  <tr>
	<td>27</td>
    <td>3</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$0.00</td>
    <td>$110.00</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="InsPlans_ComputeEstimates_ZeroWriteoffOverAgingPlanLevel">
        <TestNum>122</TestNum>
        <VersionAdded>22.3</VersionAdded>
        <Description>Patient has one insurance plan, PPO, subscriber self. Global preference to zero out write-offs when frequency or aging is entirely exceeded is set to false, plan override is set to true. Benefits include aging limitation of 26 year olds, crowns 90%. Three procedures are treatment planned: all crowns for $110, for the second and third procedure the patient age will go over the aging limitation. The third and second TP must recieve a $0 estimated write off.<br/>
<table>
  <tr>
	<td><b>Patient Age</b></td>
    <td><b>Procedure</b></td>
    <td><b>Fee</b></td>
    <td><b>Ins Pay Est.</b></td>
    <td><b>Write-off</b></td>
    <td><b>Pat portion</b></td>
  </tr>
  <tr>
	<td>25</td>
    <td>1</td>
    <td>$110.00</td>
    <td>$81.00</td>
    <td>$20.00</td>
    <td>$9.00</td>
  </tr>
  <tr>
	<td>26</td>
    <td>2</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$0.00</td>
    <td>$110.00</td>
  </tr>
  <tr>
	<td>27</td>
    <td>3</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$0.00</td>
    <td>$110.00</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="InsPlans_ComputeEstimates_ZeroWriteoffOverAgingGlobalLevelOff">
        <TestNum>123</TestNum>
        <VersionAdded>22.3</VersionAdded>
        <Description>Patient has one insurance plan, PPO, subscriber self. Global preference to zero out write-offs when frequency or aging is entirely exceeded is set to false, plan override is set to default. Benefits include aging limitation of 26 year olds, crowns 90%. Three procedures are treatment planned: all crowns for $110, for the second and third procedure the patient age will go over the aging limitation. All TP must recieve a $20 estimated write off.<br/>
<table>
  <tr>
	<td><b>Patient Age</b></td>
    <td><b>Procedure</b></td>
    <td><b>Fee</b></td>
    <td><b>Ins Pay Est.</b></td>
    <td><b>Write-off</b></td>
    <td><b>Pat portion</b></td>
  </tr>
  <tr>
	<td>25</td>
    <td>1</td>
    <td>$110.00</td>
    <td>$81.00</td>
    <td>$20.00</td>
    <td>$9.00</td>
  </tr>
  <tr>
	<td>26</td>
    <td>2</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$20.00</td>
    <td>$90.00</td>
  </tr>
  <tr>
	<td>27</td>
    <td>3</td>
    <td>$110.00</td>
    <td>$0.00</td>
    <td>$20.00</td>
    <td>$90.00</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="RpOutstandingIns_ZeroClaim_SentClaim2ClaimProcsNotRecievedNoPayment">
        <TestNum>124</TestNum>
        <VersionAdded>22.3</VersionAdded>
        <Description>Creates a claim with two ClaimProcs attached. One of the ClaimProcs has a Status of 'Not Received'. The other has a Status of 'Preauth'. Neither ClaimProc has a ClaimPayment attached. The Claim is cleared by setting it's Status to 'Received' and it's DateReceived to today. Each ClaimProc has it's Writeoff, InsPayAmt, and InsPayEst set to 0 if it's Status is 'PreAuth' or 'Not Received' and it has no ClaimPayment attached.</Description>
    </UnitTest>
    <UnitTest Name="RpOutstandingIns_ZeroClaim_SentClaim2ClaimProcsNotRecieved1Payment">
        <TestNum>125</TestNum>
        <VersionAdded>22.3</VersionAdded>
        <Description>Creates a claim with two ClaimProcs attached. One of the ClaimProcs has a Status of 'Not Received' and the other has a Status of 'Preauth'. One of the ClaimProcs has a ClaimPayment attached, the other does not. The Claim is cleared by setting it's Status to 'Received' and it's DateReceived to today. Each ClaimProc has it's Writeoff, InsPayAmt, and InsPayEst set to 0 if it's Status is 'PreAuth' or 'Not Received' and it has no ClaimPayment attached.</Description>
    </UnitTest>
    <UnitTest Name="RpOutstandingIns_ZeroClaim_SentClaim2ClaimProcs1NotReceived1ReceivedNoPayment">
        <TestNum>126</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Creates a claim with two ClaimProcs attached. One of the ClaimProcs has a Status of 'Not Received' and the other has a Status of 'Preauth'. One of the ClaimProcs has a ClaimPayment attached, the other does not. The Claim is cleared by setting it's Status to 'Received' and it's DateReceived to today. Each ClaimProc has it's Writeoff, InsPayAmt, and InsPayEst set to 0 if it's Status is 'PreAuth' or 'Not Received' and it has no ClaimPayment attached.</Description>
    </UnitTest>
    <UnitTest Name="RpOutstandingIns_ZeroClaim_CanadaSentClaim1LabFeeNoPayment">
        <TestNum>127</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Creates a canadian claim with two ClaimProcs attached. One on the ClaimProcs is a lab proc and the other is the LabProcs' parent. Both the ClaimProcs have a status of 'Not Received'. The Claim is cleared by setting it's Status to 'Received' and it's DateReceived to today. Each ClaimProc has it's Writeoff, InsPayAmt, and InsPayEst set to 0 if it's Status is 'PreAuth' or 'Not Received' and it has no ClaimPayment attached.</Description>
    </UnitTest>
    <UnitTest Name="ApptSearch_GetSearchResults_DefaultProvNoSched_ProvTime_OneOp">
        <TestNum>128</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Searches for available time slots in one operatory for one provider. There are two total operatories in the practice. The provider is the default provider for one operatory and the other operatory is not assigned to anyone. The provider is scheduled 8am-4pm for the next 10 days. There is an appointment in the provider's operatory for tomorrow from 8am-9am with provider time 8am-8:30am. The preference for 'Appointment Search Behavior' is set to ProviderTime search logic. The first available time slot for tomorrow should be 8:30am. Since there are no preexisting appointments on subsequent days, the remaining 9 openings should all be 8am on their respective days.</Description>
    </UnitTest>
    <UnitTest Name="ApptSearch_GetSearchResults_DefaultProvNoSched_ProvTime_TwoOps">
        <TestNum>129</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Searches for available time slots in 2 operatories for 1 provider. There are three total operatories in the practice. The provider is the default provider for two operatories and the third operatory is not assigned to anyone. The provider is scheduled 8am-4pm for the next 10 days. There is an appointment in the provider's operatory for tomorrow from 8am-9am with provider time 8am-8:30am. The preference for 'Appointment Search Behavior' is set to ProviderTime search logic. The first available time slot for tomorrow should be 8:30am. Since there are no preexisting appointments on subsequent days, the remaining 9 openings should all be 8am on their respective days.</Description>
    </UnitTest>
    <UnitTest Name="ApptSearch_GetSearchResults_SchedProvNoDefault_ProvTime_OneOp">
        <TestNum>130</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Searches for available time slots in one operatory for one provider. There are two total operatories in the practice. The provider is not the default provider for the operatory either operatory. One operatory is instead assigned to the provider in the provider's schedule, while the other operatory is not assigned to anyone. The provider is scheduled 8am-4pm for the next 10 days. There is an appointment in the provider's operatory for tomorrow from 8am-9am with provider time 8am-8:30am. The preference for 'Appointment Search Behavior' is set to ProviderTime search logic. The first available time slot for tomorrow should be 8:30am. Since there are no preexisting appointments on subsequent days, the remaining 9 openings should all be 8am on their respective days.</Description>
    </UnitTest>
    <UnitTest Name="ApptSearch_GetSearchResults_SchedProvNoDefault_ProvTime_TwoOps">
        <TestNum>131</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Searches for available time slots in two operatories (B and C) for one provider A. There are three total operatories in the practice. Provider A is not the default provider for either operatory. Both A and B operatories are assigned to the provider in their schedule while the third operatory, D, is not assigned to anyone. The provider is scheduled 8am-4pm for the next 10 days. There is an appointment in operatory A for tomorrow from 8am-9am with provider time 8am-8:30am. The preference for 'Appointment Search Behavior' is set to ProviderTime search logic. The first available time slot for tomorrow should be 8:30am. Since there are no preexisting appointments on subsequent days, the remaining 9 openings should all be 8am on their respective days.</Description>
    </UnitTest>
    <UnitTest Name="ApptSearch_GetSearchResults_DefaultProvNoSched_ProvTimeOp_OneOp">
        <TestNum>132</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Searches for available time slots in one operatory for one provider. There are two total operatories in the practice. The provider is the default provider for one operatory and the other operatory is not assigned to anyone. The provider is scheduled 8am-4pm for the next 10 days. There is an appointment in the provider's operatory for tomorrow from 8am-9am with provider time 8am-8:30am. The preference for 'Appointment Search Behavior' is set to ProviderTimeOperatory search logic. The first available time slot for tomorrow should be 9am. Since there are no preexisting appointments on subsequent days, the remaining 9 openings should all be 8am on their respective days.</Description>
    </UnitTest>
    <UnitTest Name="ApptSearch_GetSearchResults_DefaultProvNoSched_ProvTimeOp_TwoOps">
        <TestNum>133</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Searches for available time slots in 2 operatories for 1 provider. There are three total operatories in the practice. The provider is the default provider for two operatories and the third operatory is not assigned to anyone. The provider is scheduled 8am-4pm for the next 10 days. There is an appointment in the provider's operatory for tomorrow from 8am-9am with provider time 8am-8:30am. The preference for 'Appointment Search Behavior' is set to ProviderTimeOperatory search logic. The first available time slot for tomorrow should be 8:30am. Since there are no preexisting appointments on subsequent days, the remaining 9 openings should all be 8am on their respective days.</Description>
    </UnitTest>
    <UnitTest Name="ApptSearch_GetSearchResults_SchedProvNoDefault_ProvTimeOp_OneOp">
        <TestNum>134</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Searches for available time slots in one operatory for one provider. There are two total operatories in the practice. The provider is not the default provider for the operatory either operatory. One operatory is instead assigned to the provider in the provider's schedule, while the other operatory is not assigned to anyone. The provider is scheduled 8am-4pm for the next 10 days. There is an appointment in the provider's operatory for tomorrow from 8am-9am with provider time 8am-8:30am. The preference for 'Appointment Search Behavior' is set to ProviderTimeOperatory search logic. The first available time slot for tomorrow should be 9am. Since there are no preexisting appointments on subsequent days, the remaining 9 openings should all be 8am on their respective days.</Description>
    </UnitTest>
    <UnitTest Name="ApptSearch_GetSearchResults_SchedProvNoDefault_ProvTimeOp_TwoOps">
        <TestNum>135</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Searches for available time slots in two operatories (B and C) for one provider A. There are three total operatories in the practice. Provider A is not the default provider for either operatory. Both A and B operatories are assigned to the provider in their schedule while the third operatory, D, is not assigned to anyone. The provider is scheduled 8am-4pm for the next 10 days. There is an appointment in operatory A for tomorrow from 8am-9am with provider time 8am-8:30am. The preference for 'Appointment Search Behavior' is set to ProviderTimeOperatory search logic. The first available time slot for tomorrow should be 8:30am. Since there are no preexisting appointments on subsequent days, the remaining 9 openings should all be 8am on their respective days.</Description>
    </UnitTest>
    <UnitTest Name="ApptSearch_GetSearchResults_DefaultProvNoSched_ProvTimeOp_OneOp_Only">
        <TestNum>136</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Searches for available time slots in 1 operatory for 1 provider. The operatory is the only operatory in the practice. The provider is the default provider for the operatory. The provider is scheduled 8am-4pm for the next 10 days. There is an appointment in the provider's operatory for tomorrow from 8am-9am with provider time 8am-8:30am. The preference for 'Appointment Search Behavior' is set to ProviderTimeOperatory search logic. The first available time slot for tomorrow should be 9am. Since there are no preexisting appointments on subsequent days, the remaining 9 openings should all be 8am on their respective days.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_FrequencyLimitation_Ignore_NoBillIns">
        <TestNum>137</TestNum>
        <Description>Makes sure that if two claimprocs are created for the same frequency limitation group and one is marked NoBillIns, the other claimproc estimate is unaffected.</Description>
    </UnitTest>
    <UnitTest Name="ProcMultiVisit_UpdateGroupForProc_UpdatedClaimDates">
        <TestNum>138</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Patient has a Tp'd for a multiple visit group with two procedures, D2750 and N4118. They have their own insurance where they are the subscriber. Then create a claim for D2750 which should have the status 'Hold for In Process' until N4118 is completed. Ensure the claim date is set to the first procedure's date. Then complete N4118 which should update the claim's dates of service accordingly, and have the status 'Waiting to Send'.</Description>
    </UnitTest>
    <UnitTest Name="ProcMultiVisit_UpdateGroupForProc_UpdateClaimNotPreAuth">
        <TestNum>139</TestNum>
        <VersionAdded>22.2</VersionAdded>
        <Description>Patient has a Tp'd for a multiple visit group with two procedures, D2750 and N4118. They have their own insurance where they are the subscriber. D2750 is first attached to a PreAuth claim. Receive that PreAuth and complete D2750. The PreAuth should still be received. Afterwards create a claim for D2750 which should have the status 'Hold for In Process' until N4118 is completed. The PreAuth claim should not have it's status updated since that claim was already marked 'Received'. Next complete N4118. The PreAuth should still be received, and the other claim should be 'Waiting to send' now.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_HasMetFrequencyLimitation_1DenturePerArchPer5Yrs">
        <TestNum>140</TestNum>
        <VersionAdded>23.3.1</VersionAdded>
        <Description>Ins specifies one denture or partial per [arch] every 5 years. Patient had a partial with teeth 7,8,9,10 three years ago. Estimate for new upper denture should be $0. Est for new lower denture: $1000.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_HasMetFrequencyLimitation_1CrownPerTthPer5Yrs">
        <TestNum>141</TestNum>
        <VersionAdded>23.3.1</VersionAdded>
        <Description>Ins specifies one crown per [tooth] each 5 years. Patient had a crown on #14 three years ago.  Estimate for new crown on #14 should be $0. Estimate for new crown on #15 should be $800.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_HasNotMetFrequencyLimitation_1CrownPerTthPer5Yrs">
        <TestNum>142</TestNum>
        <VersionAdded>23.3.1</VersionAdded>
        <Description>Ins specifies one crown per [tooth] each 5 years. Patient had a crown on #14 six years ago.  Estimate for new crown on #14 should be $800.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_HasMetFrequencyLimitation_1CompPerTthPer5Yrs">
        <TestNum>143</TestNum>
        <VersionAdded>23.3.1</VersionAdded>
        <Description>Ins specifies one composite filling per [tooth] every 5 years. Pt had a comp filling on #29 three years ago. Estimate for comp filling on #29 should be $0. For #30, it should be $300.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_HasMetFrequencyLimitation_3FillingsPerMouthPerYr">
        <TestNum>144</TestNum>
        <VersionAdded>23.3.1</VersionAdded>
        <Description>Ins specifies limit of three fillings per year [mouth].  Patient had two fillings three months ago, Estimate for two or more fillings should cover one but no more in the year.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_HasMetFrequencyLimitation_1CompPerTthPer5Years_3FillingsPerMouthPerYr">
        <TestNum>145</TestNum>
        <VersionAdded>23.3.1</VersionAdded>
        <Description>Ins specifies one composite filling per [tooth] every 5 years and a limit of three fillings per year [mouth]. Patient had a composite filling on #29 three years ago and composite fillings on #2 and #3 three months ago. Estimate for compostive filling on #29 should be $0. Patient needs composite fillings on #30 and #31. For #30 it should be $300. For #31 should be $0.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_HasMetFrequencyLimitation_ExamsGrouped">
        <TestNum>146</TestNum>
        <VersionAdded>23.3.1</VersionAdded>
        <Description>Exams and limited exams are covered as a group, one per year [mouth]. An exam was performed 3 months ago an covered at $150. A limited exam today should be $0.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_HasMetFrequencyLimitation_ExamsSeparate">
        <TestNum>147</TestNum>
        <VersionAdded>23.3.1</VersionAdded>
        <Description>Exams and limited exams are covered separately, one per year [mouth]. An exam was performed 3 months ago an covered at $150. A limited exam today should be $120.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_GetDeductibleByCode_DeductLessThanGeneral">
        <TestNum>148</TestNum>
        <VersionAdded>17.2.34</VersionAdded>
        <Description>A customer has an insurance plan with 100% coverage for Diagnostic work and 50% coverage for crowns. They also have a $50 general deductible and a $50 deductible on D0220. They undergo a D0220 with a $30 fee, and a D2750 with a $100 fee. Their deductible should cover the D0220, and the remaining deductible estimate for the D2750 should be $20.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_UnderAgeWithLifetimeMax">
        <TestNum>149</TestNum>
        <VersionAdded>17.3.67</VersionAdded>
        <Description>A patient is 13 years old. Their insurance covers 50% of Ortho fees within the age limit of 18. They also have an ortho lifetime max of $1000. They undergo a D8090 with a $3000 fee. Their insurance estimate should be $1000.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_OverAgeWithLifetimeMax">
        <TestNum>150</TestNum>
        <VersionAdded>17.3.67</VersionAdded>
        <Description>A patient is 20 years old. Their insurance covers 50% of Ortho fees within the age limit of 18. They also have an ortho lifetime max of $1000. They undergo a D8090 with a $3000 fee. Their insurance estimate should be $0.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_BitewingFrequency">
        <TestNum>151</TestNum>
        <VersionAdded>18.2</VersionAdded>
        <Description>A patient's insurance covers 100% of diagnostic fees, and have a frequency limitation of 1 D0274 procedure per calendar year. Within the same year, they undergo two D0274 procedures, each with a $100 fee. Their insurance estimate for the first procedure should be $100. The insurance estimate for the second procedure should be $0. <br/>
Within that same year, they undergo a D0272 procedure with a $100 fee. No limit has been established for this code, so the procedure's insurance estimate should be $100.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_CancerScreeningFrequency">
        <TestNum>152</TestNum>
        <VersionAdded>18.2</VersionAdded>
        <Description>A patient's insurance covers 100% of diagnostic fees, and has a limits the frequency of D0431 procedures to 1 per calendar year. They undergo a D0431 procedure with a $100 fee. The insurance estimate for this procedure should be $100. <br/>
Within the same year, they undergo a D0431 again with the same $100 fee. This time, the insurance estimate for the procedure should be $0.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_CrownsFrequency">
        <TestNum>153</TestNum>
        <VersionAdded>18.2</VersionAdded>
        <Description>A patient's insurance covers 100% of Crown procedure fees, with a frequency limitation of 1 D2740 per calendar year. They undergo two D2740 procedures, each with a $100 fee. The insurance estimate for the first procedure should be $100. The insurance estimate for the second procedure should be $0.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_SRPFrequency">
        <TestNum>154</TestNum>
        <VersionAdded>18.2</VersionAdded>
        <Description>A patient's insurance covers 100% of Periodontic fees, with a limit of one D4341 procedure per year. They undergo a D4341 procedure with a $100 fee. The insurance estimate for this procedure should be $100.<br/>
Within the same year, the patient undergoes another D4341 procedure. This time, the procedure's insurance estimate should be $0.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_SealantAgeLimit">
        <TestNum>155</TestNum>
        <VersionAdded>18.2</VersionAdded>
        <Description>A clinic's Sealant codegroup contains codes D1351 and D1206. Their patient is 13 years old. The patient's insurance covers 100% of their routine preventative procedure costs with an Age Limit of 12 years for procedures under the Sealant codegroup. The patient undergoes a D1206 procedure, with a $100 fee. Their insurance estimate for the procedure should be $0.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_SealantAgeLimit_PatInAgeRangeHasCoverage">
        <TestNum>156</TestNum>
        <VersionAdded>24.1</VersionAdded>
        <Description>A clinic's Sealant codegroup contains codes D1351 and D1206. Their patient is 10 years old. The patient's insurance covers 100% of their routine preventative procedure costs with an Age Limit of 12 years for procedures under the Sealant codegroup. The patient undergoes a D1351 procedure, with a $100 fee. Their insurance estimate for the procedure should be $100.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_BitewingFrequencyCanada">
        <TestNum>157</TestNum>
        <VersionAdded>18.2</VersionAdded>
        <Description>A Canadian clinic has a patient whose insurance covers 100% of their diagnostic fees, with frequency limit of one 02144 procedure per calendar year. The patient undergoes two 02144 procedures within the same year, each with a fee of $100. The insurance estimate for the first procedure should be $100. The insurance estimate for the second procedure should be $0. <br/>
Within the same year, the patient undergoes a 02143 procedure with a $100 fee. Because no limit was established for this procedure, their insurance estimate should be $100.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_BitewingFrequencyPastYear">
        <TestNum>158</TestNum>
        <VersionAdded>18.3.52</VersionAdded>
        <Description>A patient's insurance covers 100% of their diagnostic fees with a frequency limit of one D0272 procedure every 12 months. On 07/15/2018, the patient undergoes a D0272 procedure with a $100 fee. Their insurance estimate for this procedure should be $100. <br/>
Seven months later, on 02/15/2019, the patient undergoes another D0272 procedure. The insurance estimate for this procedure should be $0.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_TwoReceivedClaimProcsForSameClaim_FrequencyNotMet">
        <TestNum>159</TestNum>
        <VersionAdded>18.3.52</VersionAdded>
        <Description>A patient's insurance covers 100% of diagnostic fees, with a limit of two D0274 procedures per calendar year. On October 1st, 2018 the patient undergoes a D0274 procedure with a $100 fee. The insurance makes payments in two checks. The first check is received and entered properly. For the second check, a user error occurs and the payment is entered as a second received claimproc. <br/>
On October 31st, 2018 the patient returns for another D0274 procedure with a fee of $100. The insurance estimate should still be $100. Entering a payment as a second claimproc should not count against frequency limitations.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_ServiceYear_FrequencyMet">
        <TestNum>160</TestNum>
        <VersionAdded>18.3.43</VersionAdded>
        <Description>A patient's insurance covers 100% of their diagnostic fees. They have a limit of two D0274 procedures every service year, with the service year starting in April. On June 1st, the patient undergoes a D0274 procedure with a $100 fee. The insurance estimate for this procedure should be $100. On July 1st, the patient undergoes another D0274 procedure with a $100 fee. The insurance estimate for this procedure should also be $100. <br/>
In January of the next year, the patient undergoes a third D0274 procedure with a $100 fee. The insurance estimate for this final procedure should be $0.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_ServiceYear_FrequencyMet_SameClaim">
        <TestNum>161</TestNum>
        <VersionAdded>21.3.39</VersionAdded>
        <Description>A patient's insurance covers 100% of their diagnostic fees. They have a limit of two D0274 procedures per service year, with the service year starting in April. On June 1st, the patient undergoes a D0274 procedure with a fee of $100. The insurance estimate for this procedure should be $100.<br/>
The following January, the patient undergoes two more D0274 procedures, each having a $100 fee. These procedures end up on the same claim. The first procedure on the claim should have an insurance estimate of $100. The second procedure on the claim should have an insurance estimate of $0.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_ServiceYear_FrequencyMet_RefreshAsOfDate">
        <TestNum>162</TestNum>
        <VersionAdded>18.4.48</VersionAdded>
        <Description>A patient's insurance covers 100% of diagnostic fees. They are limited to one D0274 procedure every service year, with the service year starting in June. The patient undergoes a D0274 procedure on July 1st, with a fee of $100. The insurance estimate for this procedure should be $100. The patient then undergoes another D0274 on July 25th, with a fee of $100. The insurance estimate for this procedure should be $0. A user changes the second procedure's date to be within the next service year. The procedure's insurance estimate should update to $100.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_GetDeductibleByCode_ExcludedDeductible">
        <TestNum>163</TestNum>
        <VersionAdded>19.1.24</VersionAdded>
        <Description>A patient's insurance covers 60% of crown fees and has a $50 general deductible. The patient undergoes a D2740 procedure with a $1000 fee. The deductible for this procedure should be $50. A user adds an exclusion for crowns. Now the deductible for this procedure should be $0.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_GetDeductibleByCode_InsuranceAdjustmentDeductibleApplyToCodeSpecificDeductibles">
        <TestNum>164</TestNum>
        <VersionAdded>19.1.21</VersionAdded>
        <Description>A patient's insurance includes a $50 general deductible, a $0 diagnostic deductible, and a $50 diagnostic x ray deductible. The patient undergoes a D1110 procedure with a fee of $100, and a D0270 procedure with a fee of $1100. An adjustment is added to cover the $50 general deductible. The general deductible and the x ray deductible should both be $0.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_InLast12Months_FrequencyMetBasic">
        <TestNum>165</TestNum>
        <VersionAdded>19.1</VersionAdded>
        <Description>A patient's insurance covers 100% of their diagnostic fees. The patient is limited to two D0274 procedures every 12 months. The patient undergoes a D0274 procedure on October 28th and December 28th of 2018. These procedures each had a fee of $100. Then, on May 1st of 2019, the patient comes back for another D0274 procedure. The insurance estimate for this third procedure should be $0.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_InLast12Months_FrequencyNotMetBasic">
        <TestNum>166</TestNum>
        <VersionAdded>19.1</VersionAdded>
        <Description>A patient's insurance covers 100% of diagnostic fees. The patient is limited to two D0274 procedures every 12 months. The patient undergoes a D0274 procedure on October 1st and October 2nd of 2018. A year later, on October 1st 2019, the patient undergoes another D0274 procedure with a $100 fee. The insurance estimate for this procedure should be $100. </Description>
    </UnitTest>
    <UnitTest Name="Benefits_InLast12Months_FrequencyMetWithTwoProcsInLast12Months">
        <TestNum>167</TestNum>
        <VersionAdded>19.1</VersionAdded>
        <Description>A patient's insurance covers 100% of diagnostic fees. The patient is limited to two D0274 procedures every 12 months. The patient goes in for a D0274 procedure on October 1st and 2nd of 2018, each procedure having a fee of $100. They go in for a third D0274 procedure on October 3rd 2018, with a $100 fee. The insurance estimate for the third procedure should be $0. On October 1st 2019, the patient goes back in for another D0274 procedure with a $100 fee. The insurance estimate for this procedure should be $100. A procedure that was not covered by insurance should not count against a limit.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_InsHistBitewingFrequency">
        <TestNum>168</TestNum>
        <VersionAdded>18.4</VersionAdded>
        <Description>A patient's insurance covers 100% of diagnostic fees. The patient is limited to one D0272 procedure per calendar year. The patient underwent a D0272 procedure at an outside clinic. Within the same year, the patient undergoes a D0272 at the user's clinic, with a fee of $100. The insurance estimate for this procedure should be $0. Outside visits should count towards limits.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_ProcedureCodeWaitingPerdiodOverride">
        <TestNum>169</TestNum>
        <VersionAdded>21.2.25</VersionAdded>
        <Description>A patient has waiting periods on their insurance. There is a category-specific waiting period of two months for Routine Preventative procedures, and a code-specific waiting period of 0 months for D1351 procedures. The patient undergoes a D1351 procedure, which is within the category-specific waiting period but outside the code-specific waiting period. The category-specific waiting period should not take precedent over the code-specific waiting period. The patient should not be considered in a waiting period. </Description>
    </UnitTest>
    <UnitTest Name="PayPlanEdit_CreateTransferForDynamicPaymentPlans_PlanOverPaymentStaysWithCurrentFamilyMember">
        <TestNum>170</TestNum>
        <VersionAdded>24.2</VersionAdded>
        <Description>Patient 2 is in a family with Patient 1 who is the Guarantor. Patient 2 creates a Dynamic Payment Plan with a completed procedure for $150 and a Down Payment of $10. Patient 2 then makes a payment of $30. Increase the Principle Split to be an overpayment of $20. Create the transfer for the Dynamic Payment Plan. This should only have Payment Splits for Patient 2 and not Patient 1.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_MultiVisitGroupProcedureSkipsSyncingClaimDateWhenInProcess">
        <TestNum>171</TestNum>
        <VersionAdded>24.2</VersionAdded>
        <Description>Procedures grouped for multiple visits in prior year. Complete D2750 for $100, Tp'd D6242 for $50. Computing estimate for D6242 is calculated for current benefit year.</Description>
    </UnitTest>
    <UnitTest Name="ChartModules_GetProcDescriptPlanned_CompleteApptAttachedPlannedApptHasProcsAllPlannedApptProcsComplete">
        <TestNum>173</TestNum>
        <VersionAdded>24.1.62</VersionAdded>
        <Description>A patient has a planned appointment with a D0170 procedure and a D0274 procedure.  There is also an attached appointment to this planned appointment.  The attached appointment is set to complete, and both procedures on the planned appointment are set complete as well.  The 'ProcDescript' for the planned appointment should be '(Completed) ReEval, bitewings - four radiographic images'.</Description>
    </UnitTest>
    <UnitTest Name="ChartModules_GetProcDescriptPlanned_CompleteApptAttachedPlannedApptHasProcsSomePlannedApptProcsComplete">
        <TestNum>174</TestNum>
        <VersionAdded>24.1.62</VersionAdded>
        <Description>A patient has a planned appointment with a D0170 procedure and a D0274 procedure.  There is also an attached appointment to this planned appointment.  The attached appointment is set to complete.  The D0170 procedure is set complete, but the D0274 procedure is incomplete.  The 'ProcDescript' for the planned appointment should be '(Completed) ReEval, bitewings - four radiographic images'.</Description>
    </UnitTest>
    <UnitTest Name="ChartModules_GetProcDescriptPlanned_CompleteApptAttachedPlannedApptHasProcsNoPlannedApptProcsComplete">
        <TestNum>175</TestNum>
        <VersionAdded>24.1.62</VersionAdded>
        <Description>A patient has a planned appointment with a D0170 procedure and a D0274 procedure.  There is also an attached appointment to this planned appointment.  The attached appointment is set to complete.  The D0170 procedure and the D0274 procedure are both incomplete.  The 'ProcDescript' for the planned appointment should be '(Completed) ReEval, bitewings - four radiographic images'.</Description>
    </UnitTest>
    <UnitTest Name="ChartModules_GetProcDescriptPlanned_CompleteApptAttachedPlannedApptHasNoProcs">
        <TestNum>176</TestNum>
        <VersionAdded>24.1.62</VersionAdded>
        <Description>A patient has a planned appointment with no procedures attached.  There is also an attached appointment to this planned appointment.  The attached appointment is set to complete.  The 'ProcDescript' for the planned appointment should be '(Completed) ReEval, bitewings - four radiographic images'.</Description>
    </UnitTest>
    <UnitTest Name="GetChartModules_GetProcDescriptPlanned_UncompleteApptAttachedPlannedApptHasProcsAllPlannedApptProcsComplete">
        <TestNum>177</TestNum>
        <VersionAdded>24.1.62</VersionAdded>
        <Description>A patient has a planned appointment with a D0170 procedure and a D0274 procedure.  There is also an attached appointment to this planned appointment.  The attached appointment is still incomplete.  The D0170 procedure and the D0274 procedure are both set complete.  The 'ProcDescript' for the planned appointment should be '(Completed) ReEval, bitewings - four radiographic images'.</Description>
    </UnitTest>
    <UnitTest Name="ChartModules_GetProcDescriptPlanned_UncompleteApptAttachedPlannedApptHasProcsSomePlannedApptProcsComplete">
        <TestNum>178</TestNum>
        <VersionAdded>24.1.62</VersionAdded>
        <Description>A patient has a planned appointment with a D0170 procedure and a D0274 procedure.  There is also an attached appointment to this planned appointment.  The attached appointment is incomplete.  The D0170 procedure is set complete, but the D0274 procedure is incomplete.  The 'ProcDescript' for the planned appointment should be '(Some Procs Complete) ReEval, bitewings - four radiographic images'.</Description>
    </UnitTest>
    <UnitTest Name="ChartModules_GetProcDescriptPlanned_UncompleteApptAttachedPlannedApptHasProcsNoPlannedApptProcsComplete">
        <TestNum>179</TestNum>
        <VersionAdded>24.1.62</VersionAdded>
        <Description>A patient has a planned appointment with a D0170 procedure and a D0274 procedure.  There is also an attached appointment to this planned appointment.  The attached appointment is incomplete.  The D0170 procedure and the D0274 procedure are both incomplete.  The 'ProcDescript' for the planned appointment should be 'ReEval, bitewings - four radiographic images'.</Description>
    </UnitTest>
    <UnitTest Name="ChartModules_GetProcDescriptPlanned_UncompleteApptAttachedPlannedApptHasNoProcs">
        <TestNum>180</TestNum>
        <VersionAdded>24.1.62</VersionAdded>
        <Description>A patient has a planned appointment with no procedures.  There is also an attached appointment to this planned appointment.  The attached appointment is incomplete.  The 'ProcDescript' for the planned appointment should be ''.</Description>
    </UnitTest>
    <UnitTest Name="ChartModules_GetProcDescriptPlanned_NoApptAttachedPlannedApptHasProcsAllPlannedApptProcsComplete">
        <TestNum>181</TestNum>
        <VersionAdded>24.1.62</VersionAdded>
        <Description>A patient has a planned appointment with a D0170 procedure and a D0274 procedure.  There is no attached appointment to this planned appointment.  Both of the procedures are set complete.  The 'ProcDescript' for the planned appointment should be '(Completed) ReEval, bitewings - four radiographic images'.</Description>
    </UnitTest>
    <UnitTest Name="ChartModules_GetProcDescriptPlanned_NoApptAttachedPlannedApptHasProcsSomePlannedApptProcsComplete">
        <TestNum>182</TestNum>
        <VersionAdded>24.1.62</VersionAdded>
        <Description>A patient has a planned appointment with a D0170 procedure and a D0274 procedure.  There is no attached appointment to this planned appointment.  The D0170 procedure is set complete, but the D0274 procedure is stil incomplete.  The 'ProcDescript' for the planned appointment should be '(Some Procs Complete) ReEval, bitewings - four radiographic images'.</Description>
    </UnitTest>
    <UnitTest Name="ChartModules_GetProcDescriptPlanned_NoApptAttachedPlannedApptHasProcsNoPlannedApptProcsComplete">
        <TestNum>183</TestNum>
        <VersionAdded>24.1.62</VersionAdded>
        <Description>A patient has a planned appointment with a D0170 procedure and a D0274 procedure.  There is no attached appointment to this planned appointment.  Both of the procedures are stil incomplete.  The 'ProcDescript' for the planned appointment should be 'ReEval, bitewings - four radiographic images'.</Description>
    </UnitTest>
    <UnitTest Name="ChartModules_GetProcDescriptPlanned_NoApptAttachedPlannedApptHasNoProcs">
        <TestNum>184</TestNum>
        <VersionAdded>24.1.62</VersionAdded>
        <Description>A patient has a planned appointment with no procedures.  There is no attached appointment to this planned appointment.  The 'ProcDescript' for the planned appointment should be ''.</Description>
    </UnitTest>
    <UnitTest Name="Benefits_AgeLimits_CodeGroupOverlap">
        <TestNum>185</TestNum>
        <VersionAdded>24.1</VersionAdded>
        <Description>A procedure exists with an ADA code of D1201, and is part of the Sealant codegroup.<br/>
		Another procedure exists with an ADA code of D1201.1, and is not part of the Sealant codegroup.<br/>
		A patient with insurance has an age limit of 14 years for the Sealant codegroup.<br/>
		The procedure that is not part of the Sealants codegroup should not have its insurance estimates<br/>
		affected by the patient's Sealant age limit.</Description>
    </UnitTest>
    <UnitTest Name="ClaimProcs_ComputeBaseEst_MedicaidCOB">
        <TestNum>186</TestNum>
        <VersionAdded>24.1</VersionAdded>
        <Description>The patient has three insurance plans. The primary and secondary are PPO percentage plans with a 40% coverage for procedure D6110 and a carrier allowed amount of $500 each. The tertiary is a category percentage plan with 40% coverage for D6110 and SecondaryMedicaid COB. The subscriber is self for all plans. One procedure, D6110, with a fee of $1000, is treatment planned. When opening the Procedure Info window, the insurance estimates and payments grid should reflect the following:<br/>
<table>
	<tr>
		<td><b>Pri/Sec</b></td>
		<td><b>Ins Est</b></td>
		<td><b>Write-off</b></td>
	</tr>
	<tr>
		<td>Pri</td>
		<td>200.00</td>
		<td>500.00</td>
	</tr>
	<tr>
		<td>Sec</td>
		<td>200.00</td>
		<td>0.00</td>
	</tr>
	<tr>
		<td></td>
		<td>100.00</td>
		<td></td>
	</tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_BalanceAndIncomeTransfer_DynamicPayPlanInterestCharge">
        <TestNum>187</TestNum>
        <VersionAdded>21.2.27</VersionAdded>
        <Description>When a user creates a Dynamic Payment Plan, with attached production, payments can be made Explicitly or Implicitly linked to either one or both. In the event that the user wishes to create offsetting payments that do not Explicitly link to production, we want to be certain the Dynamic Payment Plan is not overpaid. We also do not want to allow money to be taken directly from production. If a user creates a Dynamic Payment Plan for Patient Joe, giving the plan a 5 APR and a Procedure with a total cost of $100, they may choose to pay the first payment's principal first using the following Paysplits:<br/>
<table>
	<tr>
		<td><b>Patient</b></td>
		<td><b>PayPlan</b></td>
		<td><b>Procedure</b></td>
		<td><b>Amt Paid</b></td>
		<td><b>PayPlanChargeType</b></td>
		<td><b>Notes</b></td>
	</tr>
	<tr>
		<td>Joe</td>
		<td>X</td>
		<td>X</td>
		<td>99.58</td>
		<td>Principal</td>
		<td>Payment on Payplan</td>
	</tr>
	<tr>
		<td>Joe</td>
		<td>X</td>
		<td>X</td>
		<td>99.58</td>
		<td>Unknown</td>
		<td>Income Transfer on Payplan with Procedure attached</td>
	</tr>
	<tr>
		<td>Joe</td>
		<td>X</td>
		<td></td>
		<td>-99.58</td>
		<td>Unknown</td>
		<td>Income Transfer on Payplan without Procedure attached</td>
	</tr>
</table>
This can cause the Dynamic Payment Plan to be considered overpaid since we are Explicitly adding money to it and the attached production but Implicitly removing money from the plan itself. OpenDental should see these splits and calculate that two of them are intended offsets which should net to 0. The resulting Account Entries should look like:<br/>
<table>
	<tr>
		<td><b>Patient</b></td>
		<td><b>PayPlan</b></td>
		<td><b>Procedure</b></td>
		<td><b>Amt</b></td>
		<td><b>Note</b></td>
	</tr>
	<tr>
		<td>Joe</td>
		<td>X</td>
		<td>X</td>
		<td>-99.58</td>
		<td>Remove Payment from Proc/Plan</td>
	</tr>
	<tr>
		<td>Joe</td>
		<td></td>
		<td></td>
		<td>99.58</td>
		<td>Given to Unearned</td>
	</tr>
	<tr>
		<td>Joe</td>
		<td>X</td>
		<td></td>
		<td>99.58</td>
		<td>Paid to Plan</td>
	</tr>
	<tr>
		<td>Joe</td>
		<td></td>
		<td></td>
		<td>99.58</td>
		<td>Removed from Unearned</td>
	</tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_SingleWeekRatesOneTwoThreeWithOT">
        <TestNum>188</TestNum>
        <VersionAdded>24.3</VersionAdded>
        <Description>Overtime hours should be paid at rates that depend on the ratio of hours worked within each rate.
<table>
  <tr>
    <td colspan="3">Hours Worked</td>
    <td colspan="2"></td>
    <td colspan="6">Hours Paid</td>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">OT</td>
    <td style="padding:5px;">Total</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>40</td>
    <td>5</td>
    <td>16</td>
    <td>21</td>
    <td>61</td>
    <td>26.23</td>
    <td>13.77</td>
    <td>3.28</td>
    <td>1.72</td>
    <td>10.49</td>
    <td>5.51</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_TwoWeeksBothRatesOneTwoThreeWithOT">
        <TestNum>189</TestNum>
        <VersionAdded>24.3</VersionAdded>
        <Description>Overtime hours should be paid at rates that depend on the ratio of hours worked within each rate. Each week within a pay period should calculate overtime ratios independently.
<table>
  <tr>
    <td colspan="3">Hours Worked</td>
    <td colspan="2"></td>
    <td colspan="6">Hours Paid</td>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">OT</td>
    <td style="padding:5px;">Total</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>40</td>
    <td>5</td>
    <td>16</td>
    <td>21</td>
    <td>61</td>
    <td>26.23</td>
    <td>13.77</td>
    <td>3.28</td>
    <td>1.72</td>
    <td>10.49</td>
    <td>5.51</td>
  </tr>
  <tr>
    <td>16</td>
    <td>25</td>
    <td>20</td>
    <td>21</td>
    <td>61</td>
    <td>10.49</td>
    <td>5.51</td>
    <td>16.39</td>
    <td>8.61</td>
    <td>13.11</td>
    <td>6.89</td>
  </tr>
  <tr>
    <td colspan="11"><b>Pay Period Totals</b></td>
  </tr>
  <tr>
    <td>56</td>
    <td>30</td>
    <td>36</td>
    <td>42</td>
    <td>122</td>
    <td>36.72</td>
    <td>19.28</td>
    <td>19.67</td>
    <td>10.33</td>
    <td>23.61</td>
    <td>12.39</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_TwoWeeksFirstRatesOneTwoThreeNoOTSecondRatesOneWithOT">
        <TestNum>190</TestNum>
        <VersionAdded>24.3</VersionAdded>
        <Description>A pay period should only pay overtime rates for hours worked during each week. The hours worked at different rates in other weeks should be ignored when calculating overtime ratios.
<table>
  <tr>
    <td colspan="3">Hours Worked</td>
    <td colspan="2"></td>
    <td colspan="6">Hours Paid</td>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">OT</td>
    <td style="padding:5px;">Total</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>1</td>
    <td>10</td>
    <td>29</td>
    <td>0</td>
    <td>40</td>
    <td>1</td>
    <td>0</td>
    <td>10</td>
    <td>0</td>
    <td>29</td>
    <td>0</td>
  </tr>
  <tr>
    <td>80</td>
    <td>0</td>
    <td>0</td>
    <td>40</td>
    <td>80</td>
    <td>40</td>
    <td>40</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
  </tr>
  <tr>
    <td colspan="11"><b>Pay Period Totals</b></td>
  </tr>
  <tr>
    <td>81</td>
    <td>10</td>
    <td>29</td>
    <td>40</td>
    <td>120</td>
    <td>41</td>
    <td>40</td>
    <td>10</td>
    <td>0</td>
    <td>29</td>
    <td>0</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_TwoWeeksFirstRatesThreeWithOTSecondRatesOneNoOT">
        <TestNum>191</TestNum>
        <VersionAdded>24.3</VersionAdded>
        <Description>A pay period should only pay overtime rates for hours worked during each week. The hours worked at different rates in other weeks should be ignored when calculating overtime ratios.
<table>
  <tr>
    <td colspan="3">Hours Worked</td>
    <td colspan="2"></td>
    <td colspan="6">Hours Paid</td>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">OT</td>
    <td style="padding:5px;">Total</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>0</td>
    <td>0</td>
    <td>46</td>
    <td>6</td>
    <td>46</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>40</td>
    <td>6</td>
  </tr>
  <tr>
    <td>40</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>40</td>
    <td>40</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
  </tr>
    <tr>
      <td colspan="11"><b>Pay Period Totals</b></td>
    </tr>
  <tr>
    <td>40</td>
    <td>0</td>
    <td>46</td>
    <td>6</td>
    <td>86</td>
    <td>40</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>40</td>
    <td>6</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_TwoWeeksFirstRatesTwoThreeWithOTSecondRatesOneWithOT">
        <TestNum>192</TestNum>
        <VersionAdded>24.3</VersionAdded>
        <Description>A pay period should only pay overtime rates for hours worked during each week. The hours worked at different rates in other weeks should be ignored when calculating overtime ratios.
<table>
  <tr>
    <td colspan="3">Hours Worked</td>
    <td colspan="2"></td>
    <td colspan="6">Hours Paid</td>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">OT</td>
    <td style="padding:5px;">Total</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>0</td>
    <td>40</td>
    <td>30</td>
    <td>30</td>
    <td>70</td>
    <td>0</td>
    <td>0</td>
    <td>22.86</td>
    <td>17.14</td>
    <td>17.14</td>
    <td>12.86</td>
  </tr>
  <tr>
    <td>60</td>
    <td>0</td>
    <td>0</td>
    <td>20</td>
    <td>60</td>
    <td>40</td>
    <td>20</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
  </tr>
  <tr>
    <td colspan="11"><b>Pay Period Totals</b></td>
  </tr>
  <tr>
    <td>60</td>
    <td>40</td>
    <td>30</td>
    <td>50</td>
    <td>130</td>
    <td>40</td>
    <td>20</td>
    <td>22.86</td>
    <td>17.14</td>
    <td>17.14</td>
    <td>12.86</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_TwoWeeksFirstRatesOneTwoThreeWithOTSecondRatesOneWithOT">
        <TestNum>193</TestNum>
        <VersionAdded>24.3</VersionAdded>
        <Description>A pay period should only pay overtime rates for hours worked during each week. The hours worked at different rates in other weeks should be ignored when calculating overtime ratios.
<table>
  <tr>
    <td colspan="3">Hours Worked</td>
    <td colspan="2"></td>
    <td colspan="6">Hours Paid</td>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">OT</td>
    <td style="padding:5px;">Total</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>5</td>
    <td>25</td>
    <td>25</td>
    <td>15</td>
    <td>55</td>
    <td>3.64</td>
    <td>1.36</td>
    <td>18.18</td>
    <td>6.82</td>
    <td>18.18</td>
    <td>6.82</td>
  </tr>
  <tr>
    <td>50</td>
    <td>0</td>
    <td>0</td>
    <td>10</td>
    <td>50</td>
    <td>40</td>
    <td>10</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
  </tr>
  <tr>
    <td colspan="11"><b>Pay Period Totals</b></td>
  </tr>
  <tr>
    <td>55</td>
    <td>25</td>
    <td>25</td>
    <td>25</td>
    <td>105</td>
    <td>43.64</td>
    <td>11.36</td>
    <td>18.18</td>
    <td>6.82</td>
    <td>18.18</td>
    <td>6.82</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_TwoWeeksFirstRatesOneTwoThreeWithOTSecondRatesOneNoOT">
        <TestNum>194</TestNum>
        <VersionAdded>24.3</VersionAdded>
        <Description>A pay period should only pay overtime rates for hours worked during each week. The hours worked at different rates in other weeks should be ignored when calculating overtime ratios.
<table>
  <tr>
    <td colspan="3">Hours Worked</td>
    <td colspan="2"></td>
    <td colspan="6">Hours Paid</td>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">OT</td>
    <td style="padding:5px;">Total</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>20</td>
    <td>20</td>
    <td>20</td>
    <td>20</td>
    <td>60</td>
    <td>13.33</td>
    <td>6.67</td>
    <td>13.33</td>
    <td>6.67</td>
    <td>13.33</td>
    <td>6.67</td>
  </tr>
  <tr>
    <td>40</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>40</td>
    <td>40</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
  </tr>
  <tr>
    <td colspan="11"><b>Pay Period Totals</b></td>
  </tr>
  <tr>
    <td>60</td>
    <td>20</td>
    <td>20</td>
    <td>20</td>
    <td>100</td>
    <td>53.33</td>
    <td>6.67</td>
    <td>13.33</td>
    <td>6.67</td>
    <td>13.33</td>
    <td>6.67</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods1">
        <TestNum>195</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>30</td>
    <td>0</td>
    <td>0</td>
    <td>16</td>
    <td>0</td>
    <td>0</td>
    <td>10</td>
    <td>6</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods2">
        <TestNum>196</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>45</td>
    <td>0</td>
    <td>0</td>
    <td>7</td>
    <td>0</td>
    <td>0</td>
    <td>-5</td>
    <td>12</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods3">
        <TestNum>197</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>20</td>
    <td>20</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>20</td>
    <td>-6.67</td>
    <td>6.67</td>
    <td>-6.67</td>
    <td>6.67</td>
    <td>13.33</td>
    <td>6.67</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods4">
        <TestNum>198</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>20</td>
    <td>20</td>
    <td>20</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>-6.67</td>
    <td>6.67</td>
    <td>-6.67</td>
    <td>6.67</td>
    <td>-6.67</td>
    <td>6.67</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods5">
        <TestNum>199</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>14</td>
    <td>0</td>
    <td>10</td>
    <td>10</td>
    <td>2</td>
    <td>8</td>
    <td>7.82</td>
    <td>2.18</td>
    <td>1.82</td>
    <td>0.18</td>
    <td>6.36</td>
    <td>1.64</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods6">
        <TestNum>200</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>16</td>
    <td>4</td>
    <td>0</td>
    <td>16</td>
    <td>6</td>
    <td>0</td>
    <td>14.48</td>
    <td>1.52</td>
    <td>5.52</td>
    <td>0.48</td>
    <td>0</td>
    <td>0</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods7">
        <TestNum>201</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>20.5</td>
    <td>0</td>
    <td>0</td>
    <td>9</td>
    <td>0</td>
    <td>15.5</td>
    <td>5.72</td>
    <td>3.28</td>
    <td>0.00</td>
    <td>0.00</td>
    <td>13.78</td>
    <td>1.72</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods8">
        <TestNum>202</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>24</td>
    <td>0</td>
    <td>8</td>
    <td>0</td>
    <td>0</td>
    <td>8.25</td>
    <td>-0.15</td>
    <td>0.15</td>
    <td>0</td>
    <td>0</td>
    <td>8.15</td>
    <td>0.10</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods9">
        <TestNum>203</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>0</td>
    <td>25.5</td>
    <td>9.25</td>
    <td>0</td>
    <td>4</td>
    <td>8</td>
    <td>0.00</td>
    <td>0.00</td>
    <td>-0.26</td>
    <td>4.26</td>
    <td>5.51</td>
    <td>2.49</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods10">
        <TestNum>204</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>45</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>-5</td>
    <td>5</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods11">
        <TestNum>205</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>45</td>
    <td>0</td>
    <td>0</td>
    <td>40</td>
    <td>5</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods12">
        <TestNum>206</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>12</td>
    <td>12</td>
    <td>12</td>
    <td>12</td>
    <td>12</td>
    <td>12</td>
    <td>1.33</td>
    <td>10.67</td>
    <td>1.33</td>
    <td>10.67</td>
    <td>1.33</td>
    <td>10.67</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods13">
        <TestNum>207</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>11</td>
    <td>0</td>
    <td>15</td>
    <td>10</td>
    <td>0</td>
    <td>19</td>
    <td>4.27</td>
    <td>5.73</td>
    <td>0</td>
    <td>0</td>
    <td>9.73</td>
    <td>9.27</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods14">
        <TestNum>208</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>12</td>
    <td>20</td>
    <td>0</td>
    <td>7</td>
    <td>9</td>
    <td>0</td>
    <td>3.83</td>
    <td>3.17</td>
    <td>4.17</td>
    <td>4.83</td>
    <td>0</td>
    <td>0</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods15">
        <TestNum>209</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>0</td>
    <td>32</td>
    <td>0</td>
    <td>0</td>
    <td>15</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>8</td>
    <td>7</td>
    <td>0</td>
    <td>0</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods16">
        <TestNum>210</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>0</td>
    <td>0</td>
    <td>20</td>
    <td>0</td>
    <td>0</td>
    <td>23</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>20</td>
    <td>3</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods17">
        <TestNum>211</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>24</td>
    <td>5</td>
    <td>15</td>
    <td>21.82</td>
    <td>2.18</td>
    <td>4.55</td>
    <td>0.45</td>
    <td>13.64</td>
    <td>1.36</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods18">
        <TestNum>212</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>14</td>
    <td>5</td>
    <td>16</td>
    <td>8</td>
    <td>17.5</td>
    <td>2</td>
    <td>0.08</td>
    <td>7.92</td>
    <td>9.40</td>
    <td>8.10</td>
    <td>-4.48</td>
    <td>6.48</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods19">
        <TestNum>213</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
    <th rowspan="2" colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>6.5</td>
    <td>10</td>
    <td>23.5</td>
    <td>19</td>
    <td>0</td>
    <td>0</td>
    <td>10.79</td>
    <td>8.21</td>
    <td>-3.22</td>
    <td>3.22</td>
    <td>-7.57</td>
    <td>7.57</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriodsNoOT">
        <TestNum>214</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests an 'incomplete week' at the end of a pay period that contains more than 40 hours.<br/>
However, there should be no overtime paid since the week is not complete. The next pay period will complete the week and be responsible for paying overtime.<br/>
Create a pay period in October of 2024 that spans from the 5th to the 18th.<br/>
The start of the week is on Sunday, so the end of the payment period will include an 'incomplete week' (13th - 18th).<br/>
Work 9 AM to 7 PM every weekday during the 'incomplete week' to total 50 hours of 'straight time'.<br/>
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (19th - 31st).<br/>
Assert there is no overtime adjustment created when calculating overtime for the pay period with the 'incomplete week'.</Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods1">
        <TestNum>215</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>30</td>
    <td>0</td>
    <td>0</td>
    <td>16</td>
    <td>0</td>
    <td>0</td>
    <td>-6</td>
    <td>6</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods2">
        <TestNum>216</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>45</td>
    <td>0</td>
    <td>0</td>
    <td>7</td>
    <td>0</td>
    <td>0</td>
    <td>-12</td>
    <td>12</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods3">
        <TestNum>217</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>20</td>
    <td>20</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>20</td>
    <td>-20</td>
    <td>20</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods4">
        <TestNum>218</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>20</td>
    <td>20</td>
    <td>20</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>-20</td>
    <td>20</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods5">
        <TestNum>219</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>14</td>
    <td>0</td>
    <td>10</td>
    <td>10</td>
    <td>2</td>
    <td>8</td>
    <td>-4</td>
    <td>4</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods6">
        <TestNum>220</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>16</td>
    <td>4</td>
    <td>0</td>
    <td>16</td>
    <td>6</td>
    <td>0</td>
    <td>-2</td>
    <td>2</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods7">
        <TestNum>221</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>20.5</td>
    <td>0</td>
    <td>0</td>
    <td>9</td>
    <td>0</td>
    <td>15.5</td>
    <td>-5</td>
    <td>5</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods8">
        <TestNum>222</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>24</td>
    <td>0</td>
    <td>8</td>
    <td>0</td>
    <td>0</td>
    <td>8.25</td>
    <td>-0.25</td>
    <td>0.25</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods9">
        <TestNum>223</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>0</td>
    <td>25.5</td>
    <td>9.25</td>
    <td>0</td>
    <td>4</td>
    <td>8</td>
    <td>-6.75</td>
    <td>6.75</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods10">
        <TestNum>224</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>45</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>-5</td>
    <td>5</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods11">
        <TestNum>225</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>45</td>
    <td>0</td>
    <td>0</td>
    <td>-5</td>
    <td>5</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods12">
        <TestNum>226</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>12</td>
    <td>12</td>
    <td>12</td>
    <td>12</td>
    <td>12</td>
    <td>12</td>
    <td>-32</td>
    <td>32</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods13">
        <TestNum>227</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>11</td>
    <td>0</td>
    <td>15</td>
    <td>10</td>
    <td>0</td>
    <td>19</td>
    <td>-15</td>
    <td>15</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods14">
        <TestNum>228</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>12</td>
    <td>20</td>
    <td>0</td>
    <td>7</td>
    <td>9</td>
    <td>0</td>
    <td>-8</td>
    <td>8</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods15">
        <TestNum>229</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>0</td>
    <td>32</td>
    <td>0</td>
    <td>0</td>
    <td>15</td>
    <td>0</td>
    <td>-7</td>
    <td>7</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods16">
        <TestNum>230</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>0</td>
    <td>0</td>
    <td>20</td>
    <td>0</td>
    <td>0</td>
    <td>23</td>
    <td>-3</td>
    <td>3</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods17">
        <TestNum>231</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>24</td>
    <td>5</td>
    <td>15</td>
    <td>-4</td>
    <td>4</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods18">
        <TestNum>232</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>14</td>
    <td>5</td>
    <td>16</td>
    <td>8</td>
    <td>17.5</td>
    <td>2</td>
    <td>-22.5</td>
    <td>22.5</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_IncompleteWeekOverTwoPayPeriods19">
        <TestNum>233</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Tests that an automatic TimeAdjust entry is made for an 'incomplete week' that spans two pay periods.<br/>
<table>
  <tr>
    <th colspan="6">Reg Hours Worked</th>
    <th rowspan="2" colspan="2">Pay Period 2 TimeAdjust</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Reg Hours</td>
    <td style="padding:5px;">OT Hours</td>
  </tr>
  <tr>
    <td>6.5</td>
    <td>10</td>
    <td>23.5</td>
    <td>19</td>
    <td>0</td>
    <td>0</td>
    <td>-19</td>
    <td>19</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="PayPlanEdit_CreateTransferForDynamicPaymentPlans_PlanOverPaymentCreatesInterestSplitsWithNoProcNum">
        <TestNum>234</TestNum>
        <VersionAdded>24.3</VersionAdded>
        <Description>Create a dynamic Payment Plan (Treat as Complete) with one procedure for $400 and %15 apr and issue the first charge. Make a payment that completely overpays the charge (on principal). The interest on the charge has an amount end of $0.</Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriods1_WithProtectedLeaveAndPTO">
        <TestNum>235</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should always pay 'straight time' rates for hours worked even when there are more than 40 hours.
The next pay period will be in charge of offsetting any 'straight time' with overtime since the week will complete in this next pay period.
Example: Create a pay period in October of 2024 that spans from the 3rd to the 16th with the start of the week being Sunday.
The last week towards the end of the pay period will be an 'incomplete week' (13th - 16th).
All overtime for the week of the 13th through the 19th needs to be calculated on the next pay period (17th - 29th).
<table>
  <tr>
    <th colspan="8">Hours Worked</th>
    <th rowspan="2" colspan="8">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="5">Pay Period 2</th>
  </tr>
  <tr>
  </tr>
  <tr>
    <td>Rate 1</td>
    <td>Rate 2</td>
    <td>Rate 3</td>
    <td>Rate 1</td>
    <td>Rate 2</td>
    <td>Rate 3</td>
    <td>Protected Leave</td>
    <td>PTO</td>
    <td>Rate 1</td>
    <td>Rate 1 OT</td>
    <td>Rate 2</td>
    <td>Rate 2 OT</td>
    <td>Rate 3</td>
    <td>Rate 3 OT</td>
    <td>Protected Leave</td>
    <td>PTO</td>
  </tr>
  <tr>
    <td>30</td>
    <td>0</td>
    <td>0</td>
    <td>16</td>
    <td>0</td>
    <td>0</td>
    <td>1</td>
    <td>3</td>
    <td>10</td>
    <td>6</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>1</td>
    <td>3</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_SingleWeekRatesOneTwoThreeWithOTAndProtectedLeaveAndPTO">
        <TestNum>236</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Work a full 9-5 week where Tue (11 hours) and Wed (10 hours) accumulated 5 hours of Rate 2 (worked after 17:00). Also, work 8 hours each day of the weekend (Sat and Sun) yielding 16 hours of Rate 3 (weekend time). Overtime hours should be paid at rates that depend on the ratio of hours worked within each rate.
<table>
  <tr>
    <td colspan="3">Hours Worked</td>
    <td colspan="2"></td>
    <td colspan="8">Hours Paid</td>
  </tr>
  <tr>
    <td>Rate 1</td>
    <td>Rate 2</td>
    <td>Rate 3</td>
    <td>OT</td>
    <td>Total</td>
    <td>Rate 1</td>
    <td>Rate 1 OT</td>
    <td>Rate 2</td>
    <td>Rate 2 OT</td>
    <td>Rate 3</td>
    <td>Rate 3 OT</td>
    <td>Protected Leave</td>
    <td>PTO</td>
  </tr>
  <tr>
    <td>40</td>
    <td>5</td>
    <td>16</td>
    <td>21</td>
    <td>61</td>
    <td>26.23</td>
    <td>13.77</td>
    <td>3.28</td>
    <td>1.72</td>
    <td>10.49</td>
    <td>5.51</td>
    <td>1</td>
    <td>3</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_SingleWeekRatesOneTwoWithProtectedLeave">
        <TestNum>237</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>The work week starts on Sunday. Push the Calc Daily button, then push the Calc Week OT button. There is an overtime rule for rate2 before 6am. Breaks create automatic adjustments over 30 minutes. Testing that paid leave does not add to hours worked when considering a timecard down to the seconds.<br/>
<table>
  <tr>
    <td>Date</td>
    <td>TimeDisplayed1</td>
    <td>TimeDisplayed2</td>
    <td>Total</td>
    <td>ClockStatus</td>
    <td>AdjAuto</td>
    <td>Rate2</td>
    <td>Protected Leave</td>
    <td>Day</td>
    <td>Week</td>
  </tr>
  <tr>
    <td>12/16/24</td>
    <td></td>
    <td></td>
    <td></td>
    <td>Adj</td>
    <td></td>
    <td></td>
    <td>8:00:00</td>
    <td>8:00:00</td>
    <td></td>
  </tr>
  <tr>
    <td>12/17/24</td>
    <td></td>
    <td></td>
    <td></td>
    <td>Adj</td>
    <td></td>
    <td></td>
    <td>8:00:00</td>
    <td>8:00:00</td>
    <td></td>
  </tr>
  <tr>
    <td>12/18/24</td>
    <td>4:48:04 AM</td>
    <td>10:16:21 AM</td>
    <td>5:28:17</td>
    <td>Work</td>
    <td></td>
    <td>1:11:56</td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td>12/18/24</td>
    <td>8:22:10 AM</td>
    <td>10:16:20 AM</td>
    <td>1:54:10</td>
    <td>Break</td>
    <td>-1:24:10</td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td>12/18/24</td>
    <td>10:16:22 AM</td>
    <td>3:02:32 PM</td>
    <td>4:46:10</td>
    <td>Work</td>
    <td></td>
    <td></td>
    <td></td>
    <td>8:50:17</td>
    <td></td>
  </tr>
  <tr>
    <td>12/19/24</td>
    <td>4:58:33 AM</td>
    <td>3:30:18 PM</td>
    <td>10:31:45</td>
    <td>Work</td>
    <td></td>
    <td>1:01:27</td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td>12/19/24</td>
    <td>1:21:42 PM</td>
    <td>1:54:29 PM</td>
    <td>0:32:47</td>
    <td>Break</td>
    <td>-0:02:47</td>
    <td></td>
    <td></td>
    <td>10:28:58</td>
    <td></td>
  </tr>
  <tr>
    <td>12/20/24</td>
    <td>4:45:29 AM</td>
    <td>9:20:49 AM</td>
    <td>4:35:20</td>
    <td>Work</td>
    <td></td>
    <td>1:14:31</td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td>12/20/24</td>
    <td>7:31:41 AM</td>
    <td>9:20:48 AM</td>
    <td>1:49:07</td>
    <td>Break</td>
    <td>-1:19:07</td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td>12/20/24</td>
    <td>9:20:50 AM</td>
    <td>1:54:25 AM</td>
    <td>4:33:35</td>
    <td>Work</td>
    <td></td>
    <td></td>
    <td></td>
    <td>7:49:48</td>
    <td></td>
  </tr>
  <tr>
    <td>12/21/24</td>
    <td></td>
    <td></td>
    <td>4:49:48</td>
    <td>Adj</td>
    <td></td>
    <td></td>
    <td></td>
    <td>4:49:48</td>
    <td>31:58:51</td>
  </tr>
</table>
<table>
  <tr>
    <td colspan='4'>Pay Period Results</td>
  </tr>
  <tr>
    <td>Rate 1</td>
    <td>Rate 1 OT</td>
    <td>Rate2</td>
    <td>Rate 2 OT</td>
    <td>Protected Leave</td>
  </tr>
  <tr>
    <td>28:30</td>
    <td></td>
    <td>3:27</td>
    <td></td>
    <td>16:00</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_AdjustmentsForOverBreaksWithOvertime">
        <TestNum>238</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Adjustments automatically made due to the 'Calc Daily button makes adjustments if breaks over 30 minutes' preference should be considered by the Calc Weekly button even when the automatic adjustment causes a clock event to yield a negative time span.<br/>
When the preference is enabled, a work week with 41 hours of work and a 1 hour break (all on one day) should yield 40.50 total hours of work and 0.50 hours of break when calculating daily overtime.<br/>
Thus, the employee should be paid 40 hours at 'straight time' rates and 0.50 hours at overtime rates when calculating weekly overtime.</Description>
    </UnitTest>
    <UnitTest Name="AgingData_GetAgingData_IncomeTransferUnearnedToProcedure">
        <TestNum>239</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A procedure for $1,000 that was completed one year ago should yield $1,000 in the 'over 90' aging bucket. A $100 payment made to unearned 11 months ago that is eventually transferred to the procedure via an income transfer should cause the 'over 90' aging bucket to yield $900. The negative and positive payment splits associated with the income transfer should not impact the aging buckets.<br/>
<table>
  <tr>
    <th colspan="5">Patient Account</th>
  </tr>
  <tr>
    <th>Date</th>
    <th>Description</th>
    <th>Charges</th>
    <th>Credits</th>
    <th>Balance</th>
  </tr>
  <tr>
    <td>02/18/2024</td>
    <td>Procedure</td>
    <td>1,000</td>
    <td></td>
    <td>1,000</td>
  </tr>
  <tr>
    <td>03/18/2024</td>
    <td>Payment (unearned)</td>
    <td></td>
    <td>100</td>
    <td>900</td>
  </tr>
  <tr>
    <td>02/24/2025</td>
    <td>Income Transfer (from unearned)</td>
    <td></td>
    <td>-100</td>
    <td>1,000</td>
  </tr>
  <tr>
    <td>02/24/2025</td>
    <td>Income Transfer (to procedure)</td>
    <td></td>
    <td>100</td>
    <td>900</td>
  </tr>
</table>
<table>
  <tr>
    <th colspan="4">Family Aging</th>
  </tr>
  <tr>
    <th>0-30</th>
    <th>31-60</th>
    <th>61-90</th>
    <th>over 90</th>
  </tr>
  <tr>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>900</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClaimProcs_TransferClaimsAsTotalToProcedures_MultipleProcsAndProvsTransferCorrectly">
        <TestNum>240</TestNum>
        <VersionAdded>19.2</VersionAdded>
        <Description> The patient has one insurance plan and they are the only one in their family.  Benefits: covers 100% of CodeNum D0220, 80% of CodeNum D0221, and 67% of CodeNum D0222.  There are three completed procedures, and there are two different providers.  Procedure #1 is D0220 for $100 that was completed by provider #1.  Procedure #2 is D0221 for $125 that was completed by provider #2.  Procedure #3 is D0222 for $150 that was completed by provider #1.  All three procedures have an InsPayEst of $100.  Procedure #1 has no WriteOffEst, procedure #2 has a $25 WriteOffEst, and procedure #3 has a $50 WriteOffEst.  These procedures are on one claim that is received.  There is an 'As Total' payment on this claim that has $300 paid by insurance and a $75 WriteOff that is under provider #1.  After the estimates are computed and the transfers are made by opening and closing the Income Transfer Manager Window, upon opening the Edit Claim Window, there will be a claimproc for each procedure, each with an InsPayAmt of $100. The claimproc for Procedure #1 will have a WriteOff==$0.  The claimproc for Procedure #2 will have a WriteOff==$25.  The claimproc for Procedure #3 will have a WriteOff==$50.</Description>
    </UnitTest>
    <UnitTest Name="AgingData_GetAgingData_NegativePaymentPartialRefund">
        <TestNum>241</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A procedure for $100 that was completed one year ago should yield $100 in the 'over 90' aging bucket. A $100 payment made to the procedure 11 months ago should cause the 'over 90' aging bucket to yield $0. A negative payment of ($50) made today, in order to partially refund the payment, should cause the 'over 90' to yield $50.<br/>
<table>
  <tr>
    <th colspan="5">Patient Account</th>
  </tr>
  <tr>
    <th>Date</th>
    <th>Description</th>
    <th>Charges</th>
    <th>Credits</th>
    <th>Balance</th>
  </tr>
  <tr>
    <td>02/18/2024</td>
    <td>Procedure</td>
    <td>100</td>
    <td></td>
    <td>100</td>
  </tr>
  <tr>
    <td>03/18/2024</td>
    <td>Payment</td>
    <td></td>
    <td>100</td>
    <td>0</td>
  </tr>
  <tr>
    <td>02/24/2025</td>
    <td>Partial Refund</td>
    <td></td>
    <td>-50</td>
    <td>50</td>
  </tr>
</table>
<table>
  <tr>
    <th colspan="4">Family Aging</th>
  </tr>
  <tr>
    <th>0-30</th>
    <th>31-60</th>
    <th>61-90</th>
    <th>over 90</th>
  </tr>
  <tr>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>50</td>
  </tr>
</table>
Arguably, we could have placed the partial refund in the 0-30 aging bucket. <br/>
But since the patient still owes money for the procedure from a year ago, the over 90 aging makes the most sense.<br/>
Also, none of these aging decisions affect any financial reports because those never allow backdating.</Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_ManualOTAppliesTowardsRate1OT">
        <TestNum>242</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Manually entered overtime should always be paid out as Rate 1 OT.<br/>
An employee that works 8 hours at Rate 3 with 3.5 hours manually set as overtime should pay out 4.5 hours of Rate 3 'straight time' and 3.5 hours of Rate 1 overtime.</Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_ManualOTNoAutoOT">
        <TestNum>243</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Manually entered overtime should offset overtime earned from working over 40 hours.<br/>
An employee that worked 41 hours in a week with 3.5 hours of manually entered overtime should get paid 37.5 hours of 'straight time' and 3.5 hours of overtime.<br/>
This asserts that the 1 hour worked over the 40 hour work week does not count additional overtime to the manual overtime entered.</Description>
    </UnitTest>
    <UnitTest Name="TimeCardRules_CalculateWeeklyOvertime_ManualOTWithAutoOT">
        <TestNum>244</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Manually entered overtime should offset overtime earned from working over 40 hours.<br/>
An employee that worked 44 hours in a week with 3.5 hours of manually entered overtime should get paid 40 hours of 'straight time' and 4 hours of overtime.<br/>
There should be a single time adjust entry created for -0.5 RegHours and +0.5 OTimeHours since 3.5 hours of overtime was manually entered.</Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriodsWithManualOT1">
        <TestNum>245</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A pay period with an 'incomplete week' at the end of the period should pay manually entered overtime as Rate 1 overtime regardless of the week being complete.
The next pay period will be in charge of paying all remaining overtime that hasn't been paid.
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
  </tr>
  <tr>
    <td>14</td>
    <td>0</td>
    <td>12 (2 manual OT)</td>
    <td>10</td>
    <td>2</td>
    <td>8</td>
  </tr>
</table>
<table>
  <tr>
    <th colspan="6">Pay Period 1 Hours Paid</th>
    <th colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>14</td>
    <td>2</td>
    <td>0</td>
    <td>0</td>
    <td>10</td>
    <td>0</td>
    <td>7.91</td>
    <td>2.09</td>
    <td>1.83</td>
    <td>0.17</td>
    <td>6.26</td>
    <td>1.74</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriodsWithManualOT2">
        <TestNum>246</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Manually entered overtime should always be paid at Rate 1 OT even when a pay period falls on an 'incomplete week' at the start of the period.
All remaining overtime should be distributed between the different rates based on the ratio that the employee worked at each rate.
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
  </tr>
  <tr>
    <td>14</td>
    <td>0</td>
    <td>10</td>
    <td>12 (2 manual OT)</td>
    <td>2</td>
    <td>8</td>
  </tr>
</table>
<table>
  <tr>
    <th colspan="6">Pay Period 1 Hours Paid</th>
    <th colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>14</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>10</td>
    <td>0</td>
    <td>7.74</td>
    <td>4.26</td>
    <td>1.83</td>
    <td>0.17</td>
    <td>6.43</td>
    <td>1.57</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekOverTwoPayPeriodsWithManualOT3">
        <TestNum>247</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Manually entered overtime during the beginning of an 'incomplete week' should not be offset as if it were paid out as 'straight time' and should be immediately paid out as Rate 1 OT.
All remaining overtime due to working over 40 hours should be distributed between the different rates based on the ratio that the employee worked at each rate.
<table>
  <tr>
    <th colspan="6">Hours Worked</th>
  </tr>
  <tr>
    <th colspan="3">Pay Period 1</th>
    <th colspan="3">Pay Period 2</th>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 3</td>
  </tr>
  <tr>
    <td>0</td>
    <td>30 (3 manual OT)</td>
    <td>20 (2 manual OT)</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
  </tr>
</table>
<table>
  <tr>
    <th colspan="6">Pay Period 1 Hours Paid</th>
    <th colspan="6">Pay Period 2 Hours Paid</th>
  </tr>
  <tr>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
    <td style="padding:5px;">Rate 1</td>
    <td style="padding:5px;">Rate 1 OT</td>
    <td style="padding:5px;">Rate 2</td>
    <td style="padding:5px;">Rate 2 OT</td>
    <td style="padding:5px;">Rate 3</td>
    <td style="padding:5px;">Rate 3 OT</td>
  </tr>
  <tr>
    <td>0</td>
    <td>5</td>
    <td>27</td>
    <td>0</td>
    <td>18</td>
    <td>0</td>
    <td>0</td>
    <td>0</td>
    <td>-3</td>
    <td>3</td>
    <td>-2</td>
    <td>2</td>
  </tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_ConstructAndLinkChargeCredits_ImplicitlyLinkAsTotalWriteOffs">
        <TestNum>248</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Patient has 1 procedure for $125. Insurance estimated it will cover $100. Receive the claim for the procedure via an As Total claim payment where 'Insurance Paid' is $100 and 'Write-off' is $25. The procedure should should be worth $0 at this point. This is called implicit linking and the relationship is not stored in the database.</Description>
    </UnitTest>
    <UnitTest Name="ClockEvents_GetTimeCardManage_IncompleteWeekWithPTO">
        <TestNum>249</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>Paid time off (PTO) adjustments made during an 'incomplete week' at the end of a pay period should not carry over to the next pay period, even if the week extends into it.
Example: Consider a pay period in February 2025 that runs from February 10th to February 23rd. The final week of this period is incomplete, spanning from February 23rd to March 1st.
If a PTO adjustment of 19 hours is made on February 23rd, it should only apply to the current pay period (February 10th–23rd) and should not carry over to the following pay period, even though it falls within an 'incomplete week.'</Description>
    </UnitTest>
    <UnitTest Name="RpProcNotBilledIns_GetProcsNotBilled_DentalAndMedicalIns">
        <TestNum>250</TestNum>
        <VersionAdded>24.3</VersionAdded>
        <Description>A procedure is completed for a patient with dental and medical insurance. The procedure must show on the Procedures Not Billed to Insurance report when the Include Medical Procedures filter is checked or unchecked.</Description>
    </UnitTest>
    <UnitTest Name="RpProcNotBilledIns_GetProcsNotBilled_MedicalInsOnly">
        <TestNum>251</TestNum>
        <VersionAdded>24.3</VersionAdded>
        <Description>A procedure is completed for a patient medical insurance. The procedure must show on the Procedures Not Billed to Insurance report when the Include Medical Procedures filter is checked and must not show when unchecked.</Description>
    </UnitTest>
    <UnitTest Name="RpProcNotBilledIns_GetProcsNotBilled_ShowProcsBeforeIns">
        <TestNum>252</TestNum>
        <VersionAdded>24.3</VersionAdded>
        <Description>A procedure is completed for a patient without insurance. An insurance plan is then created for the patient. The procedure must not show on the Procedures Not Billed to Insurance report when the 'Only show procedures completed after insurance added' filter is selected.</Description>
    </UnitTest>
    <UnitTest Name="RpProcNotBilledIns_GetProcsNotBilled_ShowProcsBeforeIns_WithinEffective">
        <TestNum>253</TestNum>
        <VersionAdded>24.3</VersionAdded>
        <Description>A procedure is completed for a patient without insurance. Three months later, two dental insurance plans are created for the patient. When the filter 'Include procedures completed within insurance effective dates' is selected on the Procedures Not Billed to Insurance report, the following must hold true:<br/>
<table>
	<tr>
		<td>Primary Plan Effective Date</td>
		<td>Primary Plan Termination Date</td>
		<td>Secondary Plan Effective Date</td>
		<td>Secondary Plan Termination Date</td>
		<td>Procedure Shows On Report?</td>
	</tr>
	<tr>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
		<td>Yes</td>
	</tr>
	<tr>
		<td>Two months ago</td>
		<td></td>
		<td>One month ago</td>
		<td></td>
		<td>No</td>
	</tr>
	<tr>
		<td>Six months ago</td>
		<td></td>
		<td>One month ago</td>
		<td></td>
		<td>Yes</td>
	</tr>
	<tr>
		<td></td>
		<td>Four months ago</td>
		<td></td>
		<td>Five months ago</td>
		<td>No</td>
	</tr>
	<tr>
		<td></td>
		<td>Two months ago</td>
		<td></td>
		<td>Four months ago</td>
		<td>Yes</td>
	</tr>
	<tr>
		<td>Eleven months ago</td>
		<td>Seven months ago</td>
		<td>One month ago</td>
		<td>Three months from now</td>
		<td>No</td>
	</tr>
		<tr>
		<td>Five months ago</td>
		<td>Two months ago</td>
		<td>One month ago</td>
		<td>One month from now</td>
		<td>Yes</td>
	</tr>
</table></Description>
    </UnitTest>
    <UnitTest Name="RpProcNotBilledIns_GetProcsNotBilled_ProcOnClaimWithDroppedPlan">
        <TestNum>254</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>A procedure is completed and attached to a claim for a patient with insurance. The insurance is dropped from the patient and a new plan is added. The procedure must not show on the Procedures Not Billed to Insurance report because the procedure is attached to a claim even though the plan attached to the procedure no longer belongs to patient.</Description>
    </UnitTest>
    <UnitTest Name="TimeSlots_GetAvailableWebSchedTimeSlotsForNewOrExistingPat_DoubleBooking_RestrictedToBlockouts_StaggeredBlockouts">
        <TestNum>255</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>There are three operatories set up with web scheduling where appointments are restricted to blockouts. Double-booking is enabled. The appointment has a duration of 40 minutes. Operatory 1 has a blockout from 9:30-10:10. Operatory 2 has a blockout from 10:00-10:40. Operatory 3 has a blockout from 9:20-10:00. Testing that it returns three available timeslots (one per operatory), and that all timeslots are what we expect.</Description>
    </UnitTest>
    <UnitTest Name="Appointments_GetSearchResults_TwoBlockouts_SameType_DifferentLengths_SeparateOps">
        <TestNum>256</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description>An office has two operatories. The first operatory has a blockout for Consultations from 8am to 10am. The second operatory has a blockout for Consultations from 8am to 9am, and a blockout for Lunch from 9am to 10am. Tomorrow, the first operatory has Consultation appointments occupying its 8am-10am Consultations blockout. The second operatory has a Consultation appointment occupying its 8am-9am Consultations blockout. The second operatory's Lunch blockout is unoccupied. The office has the Search Behavior preference set to 'ProviderTimeOperatory.' With a Consultations appointment in the Pinboard, a user clicks the 'search' button on the Appointments module. The search should not yield any results for openings tomorrow.</Description>
    </UnitTest>
    <UnitTest Name="DataConnectionCancelableTests_GetConnectionForUserQuery_Client_Middletier_Report">
        <TestNum>257</TestNum>
        <VersionAdded>25.3</VersionAdded>
        <Description>While on middletier, running a User Query to the report server through a direct connection should use the full permission SQL credentials set by user.</Description>
    </UnitTest>
    <UnitTest Name="DataConnectionCancelableTests_GetConnectionForUserQuery_Client_Middletier">
        <TestNum>258</TestNum>
        <VersionAdded>25.3</VersionAdded>
        <Description>Running a User Query while on middletier should use the low permission SQL credentials set by user.</Description>
    </UnitTest>
    <UnitTest Name="DataConnectionCancelableTests_GetConnectionForUserQuery_Client_Report">
        <TestNum>259</TestNum>
        <VersionAdded>25.3</VersionAdded>
        <Description>Running a User Query on the report server through a direct connection should use the full permission SQL credentials set by user.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_GetIncomeTransferSplitsFIFO_PatientPaymentPlanWithCredit">
        <TestNum>260</TestNum>
        <VersionAdded>25.3</VersionAdded>
        <Description>Patient has one completed procedure for $500. A dynamic payment plan with two charges worth $250 are created. An unearned payment is made for $1,000. Running a FIFO income transfer should trasnfer $250 away from unearned and apply to it one of the charges, and another $250 for the other charge.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_GetIncomeTransferSplitsFIFO_OldPatientPaymentPlanUnearnedPaySplit">
        <TestNum>261</TestNum>
        <VersionAdded>25.3</VersionAdded>
        <Description>Patient has an old payment plan worth $500. An unearned payment is made for $1,000 that is attached to the patient's payment plan. Running a FIFO income transfer should not create any new transfers because it doesn't know how to handle unearned paysplits that are attached to payment plan.</Description>
    </UnitTest>
    <UnitTest Name="StatementL_SheetFieldValues_AreAccurateOnInvoices">
        <TestNum>262</TestNum>
        <VersionAdded>25.2</VersionAdded>
        <Description>Creates a new sheet using the default statement sheet def, adds the invoice specific sheet fields to it, and verifies that each of the sheet fields output the correct values.
A patient has an insurance carrier and an associated insurance plan. An invoice statement is created with two procedures attached, each with a fee of $100.00 totaling $200.00 in procedures. Two adjustments are added, a positive adjustment of $10.00 applied to the patient's account and a negative adjustment of -$25.00 attached to Procedure #2. A dynamic payment plan is created for the patient, resulting in a $100.00 charge due immediately as a down payment and this pay plan charge is attached to the invoice. Two patient payments are made, a $100.00 general payment and $50.00 payment attached specifically to Procedure #1. A claim is created and received for Procedure #2, resulting in an insurance payment of $25.00 and a write-off of $10.00. Relevant invoice fields are populated with the patient’s data. When a user views the invoice statement in the Appointments module without hiding payment options the following should be accurately reflected:<br/>
totalLabel: 'Procedures:'<br/>
totalValue: $200.00 (sum of Procedure #1 $100.00 + Procedure #2 $100.00)<br/>
insEstLabel: 'Adjustments:'<br/>
insEstValue: -$15.00 (sum of positive adjustment $10.00 + negative adjustment -$25.00)<br/>
balanceLabel: 'Total:'<br/>
balanceValue: $285.00 (procedures $200.00 + adjustments -$15.00 + pay plan charges $100.00)<br/>
invoicePaymentLabel: 'Payments &amp; WriteOffs'<br/>
invoicePaymentValue: $185.00 (sum of patient payments $100.00 + $50.00 + insurance payment $25.00 + write-off $10.00)<br/>
invoiceTotalLabel: 'Balance Remaining:'<br/>
invoiceTotalValue: $100.00 (balance $285.00 - payments and write-offs $185.00)<br/>
invoicePayPlanLabel: 'Pay Plan Charges:'<br/>
invoicePayPlanValue: $100.00 (current unpaid pay plan charge)<br/>
grid:StatementEnclosed 'Amount Due' column: $285.00 (matches balanceValue)</Description>
    </UnitTest>
    <UnitTest Name="StatementL_SheetFieldValues_AreAccurateOnNormalStatements">
        <TestNum>263</TestNum>
        <VersionAdded>25.2</VersionAdded>
        <Description>Creates a new sheet using the default statement sheet def and verifies that each of the statement sheet fields are filled with the correct values.<br/>
A family has two patients: a guarantor and a family member. The guarantor is associated with an insurance carrier and plan. A normal statement is created for the guarantor. The guarantor has two completed procedures, each with a fee of $100.00, totaling $200.00. A third procedure is added with a fee of $500.00, and a dynamic payment plan is created for it, resulting in a $100.00 charge due immediately. Two adjustments are applied to the guarantor’s account: a positive adjustment of $10.00 and a negative adjustment of -$25.00, the latter attached to Procedure #2. Two patient payments are made: a $100.00 general payment (can be considered a prepayment) and a $50.00 payment attached to Procedure #1. Insurance coverage includes an estimate of $25.00 and a write-off estimate of $5.00 for Procedure #1, and an insurance payment of $25.00 and a write-off of $10.00 for Procedure #2. The family member has two completed procedures, one with a fee of $150.00 and another with a fee of $200.00. A third procedure is created with a fee of $300.00, and a dynamic payment plan is established, resulting in a $75.00 charge due immediately. The family member receives a $20.00 positive adjustment to their account. Two payments are made: a $60.00 general payment and a $45.00 payment attached to the first family procedure. Insurance coverage for the family member includes an estimate of $50.00 and a write-off estimate of $15.00 for the first procedure, as well as an insurance payment of $25.00 and a write-off of $10.00 for the second.<br/>
 The statement sheet fields are populated and should include family’s account data. When a user views the statement without hiding payment options, the following should be accurately reflected:<br/>
totalLabel: 'Total:'<br/>
totalValue: $405.00 (family member procedures $150.00 + $200.00 + $300 + patient procedures $100.00 + $100 + $500 + patient adjustments $10.00 and -$25.00 + patient pay plan charge $100.00 + patient payments -$100.00 and -$50.00 + patient insurance payment -$25.00 + patient write-off -$10.00 - patient pay plan production $500 + family member adjustment $20.00 + family member pay plan charge $75.00 + family member payments -$60.00 and -$45.00 + family member insurance payment -$25.00 + family member write-off -$10.00 - family member pay plan production $300)<br/>
insEstLabel: '-Ins Estimate:'<br/>
insEstValue: $95.00 (sum of family member insurance estimate $50.00 + patient insurance estimate $25.00 + family member write-off estimate $15.00 + patient write-off estimate $5.00)<br/>
balanceLabel: '=Balance:'<br/>
balanceValue: $310.00 (totalValue $405.00 - insEstValue $95.00)<br/>
payPlanAmtDueValue: $175.00 (current unpaid pay plan charges: $100.00 for patient + $75.00 for family member)<br/>
grid:StatementEnclosed 'Amount Due' column: $310.00 (matches balanceValue)</Description>
    </UnitTest>
    <UnitTest Name="StatementL_SheetFieldValues_AreAccurateOnSinglePatientStatements">
        <TestNum>264</TestNum>
        <VersionAdded>25.2</VersionAdded>
        <Description>Creates a new sheet using the default statement sheet def and verifies that each of the statement sheet fields are filled with the correct values.
A family has two patients: a guarantor and a family member. The guarantor is associated with an insurance carrier and plan. A normal statement is created for the guarantor. The guarantor has two completed procedures, each with a fee of $100.00, totaling $200.00. A third procedure is added with a fee of $500.00, and a dynamic payment plan is created for it, resulting in a $100.00 charge due immediately. Two adjustments are applied to the guarantor’s account: a positive adjustment of $10.00 and a negative adjustment of -$25.00, the latter attached to Procedure #2. Two patient payments are made: a $100.00 general payment (can be considered a prepayment) and a $50.00 payment attached to Procedure #1. Insurance coverage includes an estimate of $25.00 and a write-off estimate of $5.00 for Procedure #1, and an insurance payment of $25.00 and a write-off of $10.00 for Procedure #2. The family member has two completed procedures, one with a fee of $150.00 and another with a fee of $200.00. A third procedure is created with a fee of $300.00, and a dynamic payment plan is established, resulting in a $75.00 charge due immediately. The family member receives a $20.00 positive adjustment to their account. Two payments are made: a $60.00 general payment and a $45.00 payment attached to the first family procedure. Insurance coverage for the family member includes an estimate of $50.00 and a write-off estimate of $15.00 for the first procedure, as well as an insurance payment of $25.00 and a write-off of $10.00 for the second. Relevant statement fields are populated with the patient’s data. Family member balances exist but should not be included on the patient’s statement.<br/>
totalLabel = 'Total:'<br/>
totalValue = $100.00 (sum of procedures $100.00 + $100.00 + $300 + positive adjustments $10.00 + negative adjustments -$25.00 + pay plan charge $100.00 - pay plan production $300 + patient payments -$100.00 and -$50.00 + insurance payment -$25.00 + write-off -$10.00)<br/>
insEstLabel = '-Ins Estimate:'<br/>
insEstValue = $30.00 (insurance estimate $25.00 + write-off estimate $5.00)<br/>
balanceLabel = '=Balance:'<br/>
balanceValue = $70.00 (totalValue $100.00 - insEstValue $30.00)<br/>
payPlanAmtDueValue = $100.00 (current unpaid pay plan charge $100)<br/>
grid:StatementEnclosed 'Amount Due' column = $70.00 (matches balanceValue)</Description>
    </UnitTest>
    <UnitTest Name="ClaimProcs_ComputeBaseEst_AllowedOverride">
        <TestNum>265</TestNum>
        <VersionAdded>25.3</VersionAdded>
        <Description>For a patient with insurance plan type PPO, when a ClaimProc has a Standard Prov Fee of 294.00, an allowed amount of 94.00 from the PPO schedule, and an allowed override of 241.00, the Write-Off Estimate for the ClaimProc should be 53.00.</Description>
    </UnitTest>
    <UnitTest Name="Adjustments_CreateAdjustmentsForCareCreditAutomation_HandleRoundingErrorForEvenSplitsRefund">
        <TestNum>266</TestNum>
        <VersionAdded>25.3</VersionAdded>
        <Description>A CareCredit payments is created for $1000 to be split among three procedures, costing $333.33, $333.33, and $333.34. The paysplits created are for $333.33, $333.33, and $333.34. Then, a merchant fee of $100 is set for the payment, and adjustments are created using CareCredit Merchant Fee Adjustment Automation. This results in paysplits of 300 dollars each in the payment, the payment amount being set to $900, and negative merchant fee adjustments of $(33.33), $(33.33) and $(33.34) being attached to the procedures. Then, the first paysplit is deleted and inserted back into the DB, causing the paysplits order to change. The payment will be refunded and run through CareCredit Merchant Fee Adjustment Automation, generating new positive adjustments attached to the procedures in the amounts of  $33.33, $33.33 and $33.34. The adjustments should be attached to the procedures such that the opposing adjustments for a procedure cancel out to $0.</Description>
    </UnitTest>
    <UnitTest Name="TimeSlots_GetAvailableWebSchedTimeSlotsForNewOrExistingPat_DoubleBooking_ProviderWithTwoNewPatOperatories">
        <TestNum>267</TestNum>
        <VersionAdded>25.1</VersionAdded>
        <Description>There are two operatories set up with web scheduling where they both have the same provider. Double-booking is enabled. The appointments have a duration of 30 minutes. Testing that the list of timeslots have start times on the hour or half hour only. None of them should be bumped down by ten minutes.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_ComputeEstimates_PartialGeneralDeductibleOtherDeductibleCategories_SumNotExceedGeneralDeductible">
        <TestNum>268</TestNum>
        <VersionAdded>25.1</VersionAdded>
        <Description>The patient has one insurance plan with general deductible of $50, 100% coverage on Diagnostic, and a $10 xray deductible. We treatment plan the patient for a cleaning (D0110). The cleaning is estimated to take up $25 of the patient's $50 deductible. We mark the cleaning complete and a claim is submitted. The deductible comes out to be $25, leaving $25 as the remaining general deductible. We then treatment plan another cleaning (D0110) and an xray procedure (D0220). We set the priority of the cleaning higher than the xray procedure. This time the cost of the cleaning will use up the remaining general deductible so xray deductible estimate is $0.</Description>
    </UnitTest>
    <UnitTest Name="StatementL_SheetFieldValues_AreAccurateOnSuperFamilyInvoiceStatements">
        <TestNum>269</TestNum>
        <VersionAdded>25.3</VersionAdded>
        <Description>Creates a new sheet using a copied invoice statement that has the InvoicePaymentValues and Label field, and the StatementInvoicePayment grid field, and then verifies that each of the invoice statement sheet fields are filled with the correct values when used in a super family.<br/>
A super family has two patients: a super family guarantor and a super family member. The guarantor is associated with an insurance carrier and plan. The guarantor has two completed procedures, each with a fee of $100.00, totaling $200.00. A third procedure is added with a fee of $500.00, and a dynamic payment plan is created for it, resulting in a $100.00 charge due immediately. Two adjustments are applied to the guarantor’s account: a positive adjustment of $10.00 and a negative adjustment of -$25.00, the latter attached to Procedure #2. Two patient payments are made: a $100.00 general payment (can be considered a prepayment) and a $50.00 payment attached to Procedure #1. Insurance coverage includes an insurance payment of $25.00 and a write-off of $10.00 for Procedure #2. The family member has two completed procedures, one with a fee of $150.00 and another with a fee of $200.00. A third procedure is created with a fee of $300.00, and a dynamic payment plan is established, but no charge is due immediately. The family member receives a $20.00 positive adjustment to their account. Two payments are made: a $60.00 general payment and a $45.00 payment attached to the first family procedure. Insurance coverage for the family member includes an insurance pay estimate of $50.00 and a write-off estimate of $15.00 for the first procedure, as well as an insurance payment of $25.00 and a write-off of $10.00 for the second. Relevant invoice statement fields are populated with the both patient’s data.<br/>
totalLabel = 'Procedures:'<br/>
totalValue = 550 (Guarantor Procedures: $100.00 + $100 + SuperFam Procedures: Procedure $150.00 + Procedure $200)<br/>
insEstLabel = 'Adjustments:'<br/>
insEstValue = 5 (Guarantor Adjustments: $10 + -$25 + SuperFam Adjustment: $20)<br/>
balanceLabel = 'Total:'<br/>
balanceValue = 655 (Guarantor Procedures: $100.00 + $100 + Guarantor PayPlanCharge: $100 + SuperFam Procedures: $150.00 + $200 + SuperFam PayPlanCharge: $0 + Guarantor Adjustments: $10 + -$25 + SuperFam Adjustment: $20)<br/>
invoicePaymentLabel = 'Payments &amp; WriteOffs'<br/>
invoicePaymentValue = 340 (Guarantor Payments: $100 + $50 + Guarantor Insurance Claim: $25 + Guarantor Writeoff: $10 + SuperFam Payments: $45 + $60 + SuperFam Insurance Claim: $25 + SuperFam Writeoff: $10 + $15)<br/>
invoiceTotalLabel = 'Balance Remaining:'<br/>
invoiceTotalValue = 315 (Balance Value - Payment Value) = (Guarantor Procedures: $100.00 + $100 + Guarantor PayPlanCharge: $100 + SuperFam Procedures: $150.00 + $200 + SuperFam PayPlanCharge: $0 + Guarantor Adjustments: $10 + -$25 + SuperFam Adjustment: $20 = 655 - Guarantor Payments: $100 + $50 + Guarantor Insurance Claim: $25 + Guarantor Writeoff: $10 + SuperFam Payments: $45 + $60 + SuperFam Insurance Claim: $25 + SuperFam Writeoff: $10 + $15)<br/>
invoicePayPlanLabel = 'Pay Plan Charges:'<br/>
invoicePayPlanValue = 100 (Guarantor PayPlanCharges: $100 + SuperFam PayPlanCharges: $0)<br/>
payPlanAmtDue = 655 (BalanceValue)</Description>
    </UnitTest>
    <UnitTest Name="BenefitsTest_ExclusionSingleSingle">
        <TestNum>270</TestNum>
        <VersionAdded>25.3.0</VersionAdded>
        <Description>Exclusion benefits that apply to a single tooth. This is actually not a believable scenario because insurance companies will <br/>
specify at least pairs of teeth, but it's here for completeness. A patient's insurance plan excludes coverage for tooth #3 for (D2391 - Resin-based <br/>
composite-one surface, posterior) which is normally covered 50%.<br/>
1. After making a claim for the above procedure that happened on tooth 3, the insurance estimated payment would be 0.<br/>
2. The insurance plan excludes coverage for the same tooth as before but now the benefit is in a code group. When making a claim for the same procedure,<br/>
the insurance estimated payment would be 0.<br/>
3. The insurance plan excludes coverage for the same tooth as before but now the benefit is in a category (General D0000-D7999 and D9000-D9999). After making a claim, <br/>
the insurance estimated payment would be 0. This third test is hypothetical and not a real-world scenario.<br/>
4. An identical benefit as test 1 is made and a new procedure (D2391) happens on a different tooth (4).However, because this procedure code is <br/>
covered reguarly, insurance would pay 50.</Description>
    </UnitTest>
    <UnitTest Name="BenefitsTest_ExclusionToothRange">
        <TestNum>271</TestNum>
        <VersionAdded>25.3.0</VersionAdded>
        <Description>Exclusion benefits that apply to multiple teeth. A patient's insurance plan excludes coverage for a specific procedure <br/>
(D5214 – Mandibular partial denture) on teeth (19,30) but the procedure is regularly covered 50%.<br/>
1. After making a claim for a procedure on teeth 19,23,24, the insurance estimated payment would be 0 because the procedure includes a tooth that is excluded.<br/>
2. A benefit exclusion is made on the same range of teeth as before but this time in a code group. When making a claim for a procedure on teeth 19,23,24<br/>
the insurance estimate would be 0.<br/>
3. Same test structure as test 1 and 2 but this time the benefit is in a code category. When checking this category benefit after making a claim for a <br/>
procedure on tooth 19,23,24, the insurance estimate would be 0. This third test is hypothetical and not a real-world scenario.<br/>
4. Finally, an identical exclusion benefit as test 1 is made for a procedure that is covered regularly but this time a procedure on teeth 22,23,24. <br/>
Then when we make a claim for that procedure, the insurance estimate would be 50.</Description>
    </UnitTest>
    <UnitTest Name="BenefitsTest_ExclusionSingleTooth">
        <TestNum>272</TestNum>
        <VersionAdded>25.3.0</VersionAdded>
        <Description>Exclusion benefits that apply to multiple teeth. A patient's insurance plan excludes coverage for a specific procedure <br/>
(D2391 - Resin-based composite-one surface, posterior) on teeth (1,2,3,4) but the procedure is regularly covered 50%.<br/>
1. After making a claim for a procedure on tooth 3, the insurance estimated payment would be 0 because it's regularly covered.<br/>
2. A benefit exclusion is made on the same range of teeth as before but this time in a code group. When making a claim for a procedure on <br/>
tooth 3 the insurance estimate would be 0.<br/>
3. Same test structure as test 1 and 2 but this time the benefit is in a code category. When checking this category benefit after making a claim for a <br/>
procedure on tooth 3, the insurance estimate would be 0. This third test is hypothetical and not a real-world scenario.<br/>
4. Finally, an identical exclusion benefit as test 1 is made for a procedure that is covered regularly but this time a procedure happens on tooth 5. <br/>
Then when we make a claim for that procedure, the insurance estimate would be 50.</Description>
    </UnitTest>
    <UnitTest Name="BenefitsTest_ToothAgeLimitationCovered">
        <TestNum>273</TestNum>
        <VersionAdded>25.3.0</VersionAdded>
        <Description>Creates a patient that is 13 years old, along with an insurance plan and an age limitation benefit through age 13 <br/>
on procedure (D7140 - extraction) for a tooth range of multiple teeth (A-J primary teeth). The procedure is 50% covered regularly.<br/>
1. A claim is made for procedure D7140 on tooth "A" and the insurance pay estimate will be 50 because the age limitation doesn't apply until the patient is 14.<br/>
2. An age limitation benefit is made for a code group. Then we create a new claim for a procedure on tooth A which means the insurance pay estimate would be 50<br/>
because the age limitation hasn't taken effect yet.<br/>
3. Another age limitation like before is made but with a general category (D0000-D7999 and D9000-D9999). We create a new claim for a procedure on tooth A<br/>
and the insurance pay estimate would be 50 for this patient because the age limitation exclusion hasn't been met yet.<br/>
4. Finally a benefit identical to the benefit from the first test is made and a claim for a procedure on a tooth (K) which is outside the tooth range is made.<br/>
We would expect the insurance payment estimate to be 50 because the procedure isn't covered by the age limitation but is covered regularly.</Description>
    </UnitTest>
    <UnitTest Name="BenefitsTest_ToothAgeLimitationNotCovered">
        <TestNum>274</TestNum>
        <VersionAdded>25.3.0</VersionAdded>
        <Description>Creates a patient that is 14 years old, along with an insurance plan and an age limitation benefit through age 13 <br/>
on procedure (D7140 - extraction) for a tooth range of multiple teeth (A-J primary teeth). The procedure is 50% covered regularly.<br/>
1. A claim is made for the procedure that operates on a tooth (A). The insurance plan won't cover this because the patient is too old.<br/>
2. An identical Age Limitation benefit is made but is for a code group. Similarly, when a claim is made for the procedure on a tooth (A).<br/>
insurance will pay nothing because the patient is too old.<br/>
3. Another age limitation like before is made but with a general category (D0000-D7999 and D9000-D9999). We create another claim for the procedure <br/>
that operated on a tooth in the age limitation's range and the insurance will pay nothing because the patient is too old.<br/>
4. Finally another age limitation is made like the one from test 1 and the procedure (D7140) is covered 50% by the insurance. The procedure happens on a tooth (K)<br/>
that isn't in the tooth range for the age limitation but insurance pays the full cost because the procedure is still covered regularly.</Description>
    </UnitTest>
    <UnitTest Name="ApptSearch_GetSearchResults_FloatingProviderShowsSearchResults_ProvTimeOp">
        <TestNum>275</TestNum>
        <VersionAdded>25.3</VersionAdded>
        <Description>Searches for a schedule opening for a provider with a schedule assigned to an operatory that has a different default provider. There is one operatory, which has an assigned provider A. Provider B is scheduled in the operatory for tomorrow from 8:00 AM to 12:30 PM. We are searching for availability for Provider B to schedule a 30 minute appointment with provider time for the middle 20 minutes (/XXXX/). The preference for 'Appointment Search Behavior' is set to ProviderTimeOperatory. The search should show a single result at 8:00 AM tomorrow.</Description>
    </UnitTest>
    <UnitTest Name="Procedures_HasMetFrequencyLimitation_CalendarYear_OffsettingSupplemental">
        <TestNum>276</TestNum>
        <VersionAdded>25.3</VersionAdded>
        <Description>A patient has a frequency limitation of one D1110 procedure per calendar year. Insurance was billed, and payment was received, but the office had to refund the payment. After refunding, the frequency limitation should not be met for a new D1110 procedure.</Description>
    </UnitTest>
    <UnitTest Name="BenefitsTest_DeductibleAgeLimitationCovered">
        <TestNum>277</TestNum>
        <VersionAdded>25.3.0</VersionAdded>
        <Description>Creates a patient that is 13 years old, along with an insurance plan and an age limitation benefit through age 13 <br/>
on procedure (D7140 - extraction). The procedure is 50% covered regularly.<br/>
1. A claim is made for procedure D7140 on tooth "A" and the deductible estimate will be $100 because the age limitation doesn't apply until the patient is 14.<br/>
2. An age limitation benefit is made for a code group. Then we create a new claim for a procedure on tooth A. The deductible estimate will still be $100<br/>
because the age limitation hasn't taken effect yet.<br/>
3. Another age limitation like before is made but with a general category (D0000-D7999 and D9000-D9999). We create a new claim for a procedure on tooth A<br/>
and the deductible estimate would be $100 for this patient because the age limitation exclusion hasn't been met yet.</Description>
    </UnitTest>
    <UnitTest Name="BenefitsTest_DeductibleAgeLimitationNotCovered">
        <TestNum>278</TestNum>
        <VersionAdded>25.3.0</VersionAdded>
        <Description>Creates a patient that is 14 years old, along with an insurance plan and an age limitation benefit through age 13 <br/>
on procedure (D7140 - extraction). The procedure is 50% covered regularly. Also create a deductible of $100.<br/>
1. A claim is made for the procedure that operates on a tooth (A). The insurance plan won't cover this because the patient is too old, so the deductible estimate should be $0.<br/>
2. An identical Age Limitation benefit is made but is for a code group. Similarly, when a claim is made for the procedure on a tooth (A).<br/>
insurance will pay nothing because the patient is too old, so the deductible estimate should still be $0.<br/>
3. Another age limitation like before is made but with a general category (D0000-D7999 and D9000-D9999). We create another claim for the procedure <br/>
and the insurance will pay nothing because the patient is too old, so the deductible estimate should be $0.</Description>
    </UnitTest>
    <UnitTest Name="ClaimProcs_TransferClaimsAsTotalToProcedures_MultipleProcsAndProvsNoWriteOffEst">
        <TestNum>279</TestNum>
        <VersionAdded>24.4</VersionAdded>
        <Description> The patient has one insurance plan and they are the only one in their family.  Benefits: covers 100% of CodeNum D0220, 80% of CodeNum D0221, and 67% of CodeNum D0222.  There are three completed procedures, and there are two different providers.  Procedure #1 is D0220 for $100 that was completed by provider #1.  Procedure #2 is D0221 for $125 that was completed by provider #2.  Procedure #3 is D0222 for $150 that was completed by provider #1.  All three procedures have an InsPayEst of $100.  Procedure #1 has no WriteOffEst, procedure #2 has a $25 WriteOffEst, and procedure #3 has a $50 WriteOffEst.  These procedures are on one claim that is received.  There is an 'As Total' payment on this claim that has $300 paid by insurance and a $75 WriteOff that is under provider #1.  After the estimates are computed and the transfers are made by opening and closing the Income Transfer Manager Window, upon opening the Edit Claim Window, there will be a claimproc for each procedure, each with an InsPayAmt of $100. The claimproc for Procedure #1 will have a WriteOff==$0.  The claimproc for Procedure #2 will have a WriteOff==$25.  The claimproc for Procedure #3 will have a WriteOff==$50.</Description>
    </UnitTest>
    <UnitTest Name="PaymentEdit_ConstructAndLinkChargeCredits_InsPayPlanTest_WriteOff_Open">
        <TestNum>280</TestNum>
        <VersionAdded>25.3.37</VersionAdded>
        <Description>Patient has a procedure that has a UCR fee of $5000, and a PPO fee of $4000 due to their insurance. The patient's insurance covers 100% of the procedure category. A Claim is made for the procedure under their insurance and a claimproc is generated with a Fee of $5000, an Insurance Estimate of $4000, and a Write-off of $1000. The office receives the claim back from insurance, and creates an insurance payment plan based on this. The insurance payment plan is created for the $4000 patient responisibility for the procedure from insurance, and $400 is paid out immediately for the claim. Opening a Payment window, the balance for the procedure should be $0, as the fee is paid off in full between the write-off and the open insurance payment plan's Completed Amount.</Description>
    </UnitTest>
</members>