$xtpl->assign("prepress_options", get_select_options_with_id($app_list_strings['dom_prepress_options'], ''));
$xtpl->assign("price", $focus->price);
$xtpl->assign("paper_price", $focus->get_paper_price($focus->paperid));
if (!empty($focus->auto_price) && $focus->auto_price == 'on') {
    $xtpl->assign('auto_price_checked', 'checked="checked"');
}
if ($focus->client_paper == 'Yes') {
    $xtpl->assign('price_readonly', 'readOnly');
    $xtpl->assign('auto_price_disabled', 'disabled');
}
//else{
//	$xtpl->assign('auto_price_checked', 'disabled');
//}
$validation_script = '<script type="text/javascript"> ';
//Assign Layout list
$layoutlines = $focus->getLayoutRows();
if (count($layoutlines) == 0) {
    $xtpl->assign("LAYOUTROWS", $focus->getLayoutRow(new Layoutline(), 0, true));
    $xtpl->parse("main.row1");
}
for ($i = 0; $i < count($layoutlines); $i++) {
    $fieldcount = count($layoutlines[$i]);
    $xtpl->assign("LAYOUTROWS", $focus->getLayoutRow($layoutlines[$i], $i, true));
    $xtpl->parse("main.row1");
}
//Assign Operations list
$operationlines = $focus->getOperationsRows();
if (count($operationlines) == 0) {
    $xtpl->assign("CUTTING_OPERATIONS", "");
    $xtpl->assign("OTHER_OPERATIONS", "");
}
    $compsHtml .= $pdf->createTr(false, $comp_mod_strings["LBL_BLEED_FORMAT"], $bleed_size, $comp_mod_strings["LBL_CHILD_FORMAT"], $child);
    $compsHtml .= $pdf->createTr(true, $comp_mod_strings["LBL_RUN_FORMAT"], $run_size, $comp_mod_strings["LBL_PRESS_FORMAT"], $pressformat);
    $compsHtml .= $pdf->createHeading($comp_mod_strings["LBL_COMPONENT_COLORS"]);
    $compsHtml .= $pdf->createTr(true, $colorSideA, $estComps->inksDetailView($inks_side_a), $colorSideB, $estComps->inksDetailView($inks_side_b));
    //Prepress
    $compsHtml .= $pdf->createHeading($comp_mod_strings["LBL_COMPONENT_PREPRESS"]);
    $compsHtml .= "\t<tr bgcolor=" . $pdfColors["label"] . " >\n\t\t\t\t\t\t<td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_PREPRESS_NAME"] . "</font></td>\n\t\t\t\t\t\t<td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_TYPE"] . "</font></td>\n\t\t\t\t\t    <td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_PREPRESS_FORMAT"] . "</font></td>\n\t\t\t\t\t    <td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_PREPRESS_GAUGE"] . "</font></td>\n\t\t\t\t\t    <td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_SIDE"] . "</font></td>\n\t\t\t\t\t    <td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_PREPRESS_COUNT"] . "</font></td>\n\t\t\t\t\t</tr><tr><td height=1px bgcolor=#fff colspan=3></td></tr>";
    $prepress_rows = $estComps->getPrepressRows();
    for ($j = 0; $j < count($prepress_rows); $j++) {
        $compsHtml .= $estComps->getPrepressRowPdf($prepress_rows[$j], $j);
    }
    $compsHtml .= "</table>";
    //Press
    $compsHtml .= $pdf->createHeading($comp_mod_strings["LBL_LINEITEMS"]);
    $compsHtml .= "\t<tr bgcolor=" . $pdfColors["label"] . ">\n\t\t\t\t\t\t<td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_NUMBER_LOTS"] . "</font></td>\n\t\t\t\t\t\t<td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_NUMBER_UNITS"] . "</font></td>\n\t\t    \t\t\t<td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_RUN_STYLE"] . "</font></td>\n\t\t\t\t\t</tr><tr><td height=1px bgcolor=#fff colspan=3></td></tr>";
    $layoutrows = $estComps->getLayoutRows();
    for ($j = 0; $j < count($layoutrows); $j++) {
        $compsHtml .= $estComps->getLayoutRowPdf($layoutrows[$j], $j);
    }
    $compsHtml .= "</table>";
    //Post-Press
    $compsHtml .= $pdf->createHeading($comp_mod_strings["LBL_POSTPRESS"]);
    $compsHtml .= "\t<tr bgcolor=" . $pdfColors["label"] . ">\n\t\t\t\t\t\t<td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_OPERATION_NAME"] . "</font></td>\n\t\t\t\t\t\t<td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_TYPE"] . "</font></td>\n\t\t\t\t\t    <td ><font size=" . $pdfFontSize["default"] . ">" . $comp_mod_strings["LBL_PREPRESS_COUNT"] . "</font></td>\n\t\t\t\t\t</tr><tr><td height=1px bgcolor=#fff colspan=3></td></tr>";
    $postpress_rows = $estComps->getOperationsRows();
    for ($j = 0; $j < count($postpress_rows); $j++) {
        $compsHtml .= $estComps->getOperationsRowPdf($postpress_rows[$j], $j);
    }
    $compsHtml .= "</table>";
}
//end of main For loop
$xtpl = new XTemplate("CreatePDF.html");