

              //var ret_prev = data_ret['date_today'];
              var ret_prev = data_ret['date_prev'];
              $("#prev_Output").empty();
              $("#prev_Outputlot").empty();
              $("#prev_Resultok").empty();
              $("#prev_Resultpercen").empty();
              $("#prev_Png").empty();
              
        
              prev_pdieFull = ret_prev['pdieFull'];
              prev_pdieNow = ret_prev['pdieNow'];
              prev_povenFull = ret_prev['povenFull'];
              prev_povenNow = ret_prev['povenNow'];
              prev_pwireFull = ret_prev['pwireFull'];
              prev_pwireNow = ret_prev['pwireNow'];
              prev_pbondinFull = ret_prev['pbondinFull'];
              prev_pbondinNow = ret_prev['pbondinNow'];
              prev_pmoldFull = ret_prev['pmoldFull'];
              prev_pmoldNow = ret_prev['pmoldNow'];
              prev_povenmoldFull = ret_prev['povenmoldFull'];
              prev_povenmoldNow = ret_prev['povenmoldNow'];
              prev_pdicerFull = ret_prev['pdicerFull'];
              prev_pdicerNow = ret_prev['pdicerNow'];
              prev_pappeaFull = ret_prev['pappeaFull'];
              prev_pappeaNow = ret_prev['pappeaNow'];
              prev_pcalssFull = ret_prev['pcalssFull'];
              prev_pcalssNow = ret_prev['pcalssNow'];

              prev_indieNow = ret_prev['indieNow'];
              prev_inovenNow = ret_prev['inovenNow'];
              prev_inwirebondNow = ret_prev['inwirebondNow'];
              prev_inbondingNow = ret_prev['inbondingNow'];
              prev_inmoldNow = ret_prev['inmoldNow'];
              prev_inovenmoldNow = ret_prev['inovenmoldNow'];
              prev_indicerNow = ret_prev['indicerNow'];
              prev_inappearaNow = ret_prev['inappearaNow'];
              prev_incalssNow = ret_prev['incalssNow'];

              // input lot
              prev_indieNowlot = ret_prev['indieNowlot']; 
              prev_inovenNowlot = ret_prev['inovenNowlot'];
              prev_inwirebondNowlot = ret_prev['inwirebondNowlot'];
              prev_inbondingNowlot = ret_prev['inbondingNowlot'];
              prev_inmoldNowlot = ret_prev['inmoldNowlot'];
              prev_inovenmoldNowlot = ret_prev['inovenmoldNowlot'];
              prev_indicerNowlot = ret_prev['indicerNowlot'];
              prev_inappearaNowlot = ret_prev['inappearaNowlot'];
              prev_incalssNowlot = ret_prev['incalssNowlot'];
              // end input lot

              prev_outdieend = ret_prev['outdieend'];
              prev_outovenend = ret_prev['outovenend'];
              prev_outwirebondend = ret_prev['outwirebondend'];
              prev_outbondingend = ret_prev['outbondingend'];
              prev_outmoldend = ret_prev['outmoldend'];
              prev_outoven_moldend = ret_prev['outoven_moldend'];
              prev_outdicer_actend = ret_prev['outdicer_actend'];
              prev_outappearanceend = ret_prev['outappearanceend'];
              prev_outclassifyend = ret_prev['outclassifyend'];

              // output lot
              prev_outdieendlot = ret_prev['outdieendlot'];
              prev_outovenendlot = ret_prev['outovenendlot'];
              prev_outwirebondendlot = ret_prev['outwirebondendlot'];
              prev_outbondingendlot = ret_prev['outbondingendlot'];
              prev_outmoldendlot = ret_prev['outmoldendlot'];
              prev_outoven_moldendlot = ret_prev['outoven_moldendlot'];
              prev_outdicer_actendlot = ret_prev['outdicer_actendlot'];
              prev_outappearanceendlot = ret_prev['outappearanceendlot'];
              prev_outclassifyendlot = ret_prev['outclassifyendlot'];
              // end output lot

              prev_ngdiebond = 0;
              prev_ngovendiebond = 0;
              prev_ngwirebond = 0;
              prev_ngbonding = (ret_prev['ngbonding'][0].ngbonding==null)?0:ret_prev['ngbonding'][0].ngbonding;
              prev_ngmold = (ret_prev['ngmold'][0].ngmold==null)?0:ret_prev['ngmold'][0].ngmold;
              //console.log(ret_prev['ngmold'][0].ngmold);
              prev_ngovenmold = 0;
              prev_ngdicer = (ret_prev['ngdicer'][0].ngdicer==null)?0:ret_prev['ngdicer'][0].ngdicer;
              prev_ngappear = (ret_prev['ngappear'][0].ngappear==null)?0:ret_prev['ngappear'][0].ngappear;
              prev_ngclassify = (ret_prev['ngclassify'][0].ngclassify==null)?0:ret_prev['ngclassify'][0].ngclassify;

              prev_t3bonding = ret_prev['t3bonding'];
              prev_t3mold = ret_prev['t3mold'];
              prev_t3dicer = ret_prev['t3dicer'];
              prev_t3appea = ret_prev['t3appea'];
              prev_t3classi = ret_prev['t3classi'];
              prev_dateshow = ret_prev['dateshow'];
              prev_timeshow = ret_prev['timeshow'];

              prev_datestring = ret_prev['datestring'];

              $('.prev_digital-date').text(prev_dateshow);
              $('.prev_digital-time').text(prev_timeshow);
              $('.prev_datestring').text(prev_datestring);

              var prev_indieNow1 = 0;
              var prev_inovenNow1 = 0;
              var prev_inwirebondNow1 = 0;
              var prev_inbondingNow1 = 0;
              var prev_inmoldNow1 = 0;
              var prev_inovenmoldNow1 = 0;
              var prev_indicerNow1 = 0;
              var prev_inappearaNow1 = 0;
              var prev_incalssNow1 = 0;

              var prev_outbondingend2 = 0;
              var prev_outmoldend2 = 0;
              var prev_outdicer_actend2 = 0;
              var prev_outappearanceend2 = 0;
              var prev_outclassifyend2 = 0;


              var prev_DiSumResult = 0;
              var prev_OdiSumResult = 0;
              var prev_WieSumResult = 0;
              var prev_BondSumResult = 0;
              var prev_MoldSumResult = 0;
              var prev_OvenmoSumResult = 0;
              var prev_DicerSumResult = 0;
              var prev_MoldSumResult = 0;
              var prev_AppeaSumResult = 0;
              var prev_ClassSumResult = 0;

              var prev_NgSumdiebond = 0;
              var prev_NgSumovendiebond = 0;
              var prev_NgSumwirebond = 0;
              var prev_NgSumbonding = 0;
              var prev_NgSumngmold = 0;
              var prev_NgSumngovenmold = 0;
              var prev_NgSumngdicer = 0;
              var prev_NgSumngappear = 0;
              var prev_NgSumngclassify = 0;

              var prev_lotout_a = 0;
              var prev_lotout_b = 0;
              var prev_lotout_c = 0;
              var prev_lotout_d = 0;
              var prev_lotout_e = 0;
              var prev_lotout_f = 0;
              var prev_lotout_g = 0;
              var prev_lotout_p = 0;
              var prev_lotout_q = 0;

              var prev_lotout_percen_a = 0;
              var prev_lotout_percen_b = 0;
              var prev_lotout_percen_c = 0;
              var prev_lotout_percen_d = 0;
              var prev_lotout_percen_e = 0;
              var prev_lotout_percen_f = 0;
              var prev_lotout_percen_g = 0;
              var prev_lotout_percen_p = 0;
              var prev_lotout_percen_q = 0;
              
              var prev_diebond_ok = 0;
              var prev_ovendiebond_ok = 0;
              var prev_wirebond_ok = 0;
              var prev_bondingins_ok = 0;
              var prev_mold_ok = 0;
              var prev_ovenmold_ok = 0;
              var prev_dicer_ok = 0;
              var prev_appear_ok = 0;
              var prev_classify_ok = 0;

              if(prev_indieNow[0].indieNow !== 0){ prev_indieNow1 = numeral(prev_indieNow[0].indieNow).format('0,0')}else{ prev_indieNow1 = 0.001};
              if(prev_inovenNow[0].inovenNow !== 0){ prev_inovenNow1 = numeral(prev_inovenNow[0].inovenNow).format('0,0')}else{ prev_inovenNow1 = 0.001};
              if(prev_inwirebondNow[0].inwirebondNow !== 0){ prev_inwirebondNow1 = numeral(prev_inwirebondNow[0].inwirebondNow).format('0,0')}else{ prev_inwirebondNow1 = 0.001};
              if(prev_inbondingNow[0].inbondingNow !== 0){ prev_inbondingNow1 = numeral(prev_inbondingNow[0].inbondingNow).format('0,0')}else{ prev_inbondingNow1 = 0.001};
              if(prev_inmoldNow[0].inmoldNow !== 0){ prev_inmoldNow1 = numeral(prev_inmoldNow[0].inmoldNow).format('0,0')}else{ prev_inmoldNow1 = 0.001};
              if( typeof(prev_inovenmoldNow[0]) != "undefined" && prev_inovenmoldNow[0].inovenmoldNow !== 0){ prev_inovenmoldNow1 = numeral(prev_inovenmoldNow[0].inovenmoldNow).format('0,0')}else{ prev_inovenmoldNow1 = 0.001};
              if(prev_indicerNow[0].indicerNow !== 0){ prev_indicerNow1 = numeral(prev_indicerNow[0].indicerNow).format('0,0')}else{ prev_indicerNow1 = 0.001};
              if(prev_inappearaNow[0].inappearaNow !== 0){ prev_inappearaNow1 = numeral(prev_inappearaNow[0].inappearaNow).format('0,0')}else{ prev_inappearaNow1 = 0.001};
              if(prev_incalssNow[0].incalssNow !== 0){ prev_incalssNow1 = numeral(prev_incalssNow[0].incalssNow).format('0,0')}else{ prev_incalssNow1 = 0.001};

              if(prev_outbondingend[0].outbondingend !== 0){ prev_outbondingend2 = numeral(prev_outbondingend[0].outbondingend).format('0,0')}else{ prev_outbondingend2 = 0.001};
              if(prev_outmoldend[0].outmoldend !== 0){ prev_outmoldend2 = numeral(prev_outmoldend[0].outmoldend).format('0,0')}else{ prev_outmoldend2 = 0.001};
              if(prev_outdicer_actend[0].outdicer_actend !== 0){ prev_outdicer_actend2 = numeral(prev_outdicer_actend[0].outdicer_actend).format('0,0')}else{ prev_outdicer_actend2 = 0.001};
              if(prev_outappearanceend[0].outappearanceend !== 0){ prev_outappearanceend2 = numeral(prev_outappearanceend[0].outappearanceend).format('0,0')}else{ prev_outappearanceend2 = 0.001};
              if(prev_outclassifyend[0].outclassifyend !== 0){ prev_outclassifyend2 = numeral(prev_outclassifyend[0].outclassifyend).format('0,0')}else{ prev_outclassifyend2 = 0.001};

              prev_NgSumbonding = (numeral(prev_ngbonding).value() / numeral(prev_outbondingend2).value()) * 100 ;
              prev_NgSumngmold = (numeral(prev_ngmold).value() / numeral(prev_outmoldend2).value()) * 100 ;
              prev_NgSumngdicer = (numeral(prev_ngdicer).value() / numeral(prev_outdicer_actend2).value()) * 100 ;
              prev_NgSumngappear = (numeral(prev_ngappear).value() / numeral(prev_outappearanceend2).value()) * 100 ;
              prev_NgSumngclassify = (numeral(prev_ngclassify).value() / numeral(prev_outclassifyend2).value()) * 100 ;


              prev_diebond_ok =  (numeral(prev_outdieend[0].outdieend).value() - numeral(prev_ngdiebond).value());
              prev_ovendiebond_ok =  (numeral(prev_outovenend[0].outovenend).value() - numeral(prev_ngovendiebond).value());
              prev_wirebond_ok =  (numeral(prev_outwirebondend[0].outwirebondend).value() - numeral(prev_ngwirebond).value());
              prev_bondingins_ok =  (numeral(prev_outbondingend[0].outbondingend).value() - numeral(prev_ngbonding).value());
              prev_mold_ok =  (numeral(prev_outmoldend[0].outmoldend).value() - numeral(prev_ngmold).value());
              prev_ovenmold_ok =  (numeral(prev_outoven_moldend[0].outoven_moldend).value() - numeral(prev_ngovenmold).value());
              prev_dicer_ok =  (numeral(prev_outdicer_actend[0].outdicer_actend).value()  -numeral(prev_ngdicer).value());
              prev_appear_ok =  (numeral(prev_outappearanceend[0].outappearanceend).value() - numeral(prev_ngappear).value());
              prev_classify_ok =  (numeral(prev_outclassifyend[0].outclassifyend).value() - numeral(prev_ngclassify).value() );

              prev_lotout_a = (numeral(prev_outdieend[0].outdieend).value() - numeral(prev_diebond_ok).value()) - numeral(prev_ngdiebond).value();
              prev_lotout_b = (numeral(prev_outovenend[0].outovenend).value() - numeral(prev_ovendiebond_ok).value()) - numeral(prev_ngovendiebond).value() ;
              prev_lotout_c = (numeral(prev_outwirebondend[0].outwirebondend).value() - numeral(prev_wirebond_ok).value()) - numeral(prev_ngwirebond).value() ;
              prev_lotout_d = (numeral(prev_outbondingend[0].outbondingend).value() - numeral(prev_bondingins_ok).value()) - numeral(prev_ngbonding).value() ;
              prev_lotout_e = (numeral(prev_outmoldend[0].outmoldend).value() - numeral(prev_mold_ok).value()) - numeral(prev_ngmold).value() ;
              prev_lotout_f = (numeral(prev_outoven_moldend[0].outoven_moldend).value() - numeral(prev_ovenmold_ok).value()) - numeral(prev_ngovenmold).value() ;
              prev_lotout_g = (numeral(prev_outdicer_actend[0].outdicer_actend).value() - numeral(prev_dicer_ok).value()) - numeral(prev_ngdicer).value();
              prev_lotout_p = (numeral(prev_outappearanceend[0].outappearanceend).value() - numeral(prev_appear_ok).value()) - numeral(prev_ngappear).value() ;
              prev_lotout_q = (numeral(prev_outclassifyend[0].outclassifyend).value() - numeral(prev_classify_ok).value()) - numeral(prev_ngclassify).value() ;

              prev_lotout_percen_a = numeral(prev_lotout_a).value() / numeral(prev_indieNow[0].indieNow).value()
              prev_lotout_percen_b = numeral(prev_lotout_b).value() / numeral(prev_inovenNow[0].inovenNow).value()
              prev_lotout_percen_c = numeral(prev_lotout_c).value() / numeral(prev_inwirebondNow[0].inwirebondNow).value()
              prev_lotout_percen_d = numeral(prev_lotout_d).value() / numeral(prev_inbondingNow[0].inbondingNow).value()
              prev_lotout_percen_e = numeral(prev_lotout_e).value() / numeral(prev_inmoldNow[0].inmoldNow).value()
              prev_lotout_percen_f = numeral(prev_lotout_f).value() / numeral(prev_inovenmoldNow[0].inovenmoldNow).value()
              prev_lotout_percen_g = numeral(prev_lotout_g).value() / numeral(prev_indicerNow[0].indicerNow).value()
              prev_lotout_percen_p = numeral(prev_lotout_p).value() / numeral(prev_inappearaNow[0].inappearaNow).value()
              prev_lotout_percen_q = numeral(prev_lotout_q).value() / numeral(prev_incalssNow[0].incalssNow).value()

              var prev_bg_lotout_percen_a = "bg-white";
              var prev_bg_lotout_percen_b = "bg-white";
              var prev_bg_lotout_percen_c = "bg-white";
              var prev_bg_lotout_percen_d = "bg-white";
              var prev_bg_lotout_percen_e = "bg-white";
              var prev_bg_lotout_percen_f = "bg-white";
              var prev_bg_lotout_percen_g = "bg-white";
              var prev_bg_lotout_percen_p = "bg-white";
              var prev_bg_lotout_percen_q = "bg-white";

              if( prev_lotout_percen_a>0 ) { prev_bg_lotout_percen_a = "bg-red"; }
              if( prev_lotout_percen_b>0 ) { prev_bg_lotout_percen_b = "bg-red"; }
              if( prev_lotout_percen_c>0 ) { prev_bg_lotout_percen_c = "bg-red"; }
              if( prev_lotout_percen_d>0 ) { prev_bg_lotout_percen_d = "bg-red"; }
              if( prev_lotout_percen_e>0 ) { prev_bg_lotout_percen_e = "bg-red"; }
              if( prev_lotout_percen_f>0 ) { prev_bg_lotout_percen_f = "bg-red"; }
              if( prev_lotout_percen_g>0 ) { prev_bg_lotout_percen_g = "bg-red"; }
              if( prev_lotout_percen_p>0 ) { prev_bg_lotout_percen_p = "bg-red"; }
              if( prev_lotout_percen_q>0 ) { prev_bg_lotout_percen_q = "bg-red"; }



              $("#prev_pdieFull").text(numeral(prev_pdieFull[0].pdieFull).format('0,0'));
              $("#prev_pdieNow").text(numeral(prev_pdieNow[0].pdieNow).format('0,0'));
              $("#prev_povenNow").text(numeral(prev_povenNow[0].povenNow).format('0,0'));
              $("#prev_povenFull").text(numeral(prev_povenFull[0].povenFull).format('0,0'));
              $("#prev_pwireFull").text(numeral(prev_pwireFull[0].pwireFull).format('0,0'));
              $("#prev_pwireNow").text(numeral(prev_pwireNow[0].pwireNow).format('0,0'));
              $("#prev_pbondinFull").text(numeral(prev_pbondinFull[0].pbondinFull).format('0,0'));
              $("#prev_pbondinNow").text(numeral(prev_pbondinNow[0].pbondinNow).format('0,0'));
              $("#prev_pmoldFull").text(numeral(prev_pmoldFull[0].pmoldFull).format('0,0'));
              $("#prev_pmoldNow").text(numeral(prev_pmoldNow[0].pmoldNow).format('0,0'));
              $("#prev_povenmoldFull").text(numeral(prev_povenmoldFull[0].povenmoldFull).format('0,0'));
              $("#prev_povenmoldNow").text(numeral(prev_povenmoldNow[0].povenmoldNow).format('0,0'));
              $("#prev_pdicerNow").text(numeral(prev_pdicerNow[0].pdicerNow).format('0,0'));
              $("#prev_pdicerFull").text(numeral(prev_pdicerFull[0].pdicerFull).format('0,0'));
              $("#prev_pappeaFull").text(numeral(prev_pappeaFull[0].pappeaFull).format('0,0'));
              $("#prev_pappeaNow").text(numeral(prev_pappeaNow[0].pappeaNow).format('0,0'));
              $(".prev_pcalssFull").text(numeral(prev_pcalssFull[0].pcalssFull).format('0,0'));
              $(".prev_pcalssNow").text(numeral(prev_pcalssNow[0].pcalssNow).format('0,0'));

              $(".prev_ocalsspcs").text(numeral(prev_outclassifyend[0].outclassifyend).format('0,0'));

              
              var prev_difclass = numeral(prev_outclassifyend[0].outclassifyend).value() - numeral(pcalssNow[0].pcalssNow).value() 
              if( prev_difclass<0 ){
                $(".prev_difclass").addClass("text-danger");
              }else{
                $(".prev_difclass").removeClass("text-danger");
              }
              $(".prev_difclass").text(numeral(prev_difclass).format('0,0'));
              
              $("#prev_indieNow").text(numeral(prev_indieNow[0].indieNow).format('0,0'));
              $("#prev_inovenNow").text(numeral(prev_inovenNow[0].inovenNow).format('0,0'));
              $("#prev_inwirebondNow").text(numeral(prev_inwirebondNow[0].inwirebondNow).format('0,0'));
              $("#prev_inbondingNow").text(numeral(prev_inbondingNow[0].inbondingNow).format('0,0'));
              $("#prev_inmoldNow").text(numeral(prev_inmoldNow[0].inmoldNow).format('0,0'));
              $("#prev_inovenmoldNow").text(numeral(prev_inovenmoldNow[0].inovenmoldNow).format('0,0'));
              $("#prev_indicerNow").text(numeral(prev_indicerNow[0].indicerNow).format('0,0'));
              $("#prev_inappearaNow").text(numeral(prev_inappearaNow[0].inappearaNow).format('0,0'));
              $("#prev_incalssNow").text(numeral(prev_incalssNow[0].incalssNow).format('0,0'));

              // start input lot
              $("#prev_indieNowlot").text(numeral(prev_indieNowlot[0].indieNowlot).format('0,0'));
              $("#prev_inovenNowlot").text(numeral(prev_inovenNowlot[0].inovenNowlot).format('0,0'));
              $("#prev_inwirebondNowlot").text(numeral(prev_inwirebondNowlot[0].inwirebondNowlot).format('0,0'));
              $("#prev_inbondingNowlot").text(numeral(prev_inbondingNowlot[0].inbondingNowlot).format('0,0'));
              $("#prev_inmoldNowlot").text(numeral(prev_inmoldNowlot[0].inmoldNowlot).format('0,0'));
              $("#prev_inovenmoldNowlot").text(numeral(prev_inovenmoldNowlot[0].inovenmoldNowlot).format('0,0'));
              $("#prev_indicerNowlot").text(numeral(prev_indicerNowlot[0].indicerNowlot).format('0,0'));
              $("#prev_inappearaNowlot").text(numeral(prev_inappearaNowlot[0].inappearaNowlot).format('0,0'));
              $("#prev_incalssNowlot").text(numeral(prev_incalssNowlot[0].incalssNowlot).format('0,0'));
              // end input lot

              $("#prev_ngdiebond").text(numeral(prev_ngdiebond).format('0,0'));
              $("#prev_ngovendiebond").text(numeral(prev_ngovendiebond).format('0,0'));
              $("#prev_ngwirebond").text(numeral(prev_ngwirebond).format('0,0'));
              $("#prev_ngbonding").text(numeral(prev_ngbonding).format('0,0'));
              $("#prev_ngmold").text(numeral(prev_ngmold).format('0,0'));
              $("#prev_ngovenmold").text(numeral(prev_ngovenmold).format('0,0'));
              $("#prev_ngdicer").text(numeral(prev_ngdicer).format('0,0'));
              $("#prev_ngappear").text(numeral(prev_ngappear).format('0,0'));
              $("#prev_ngclassify").text(numeral(prev_ngclassify).format('0,0'));

              $("#prev_lotout_a").text(numeral(prev_lotout_a).format('0,0'));
              $("#prev_lotout_b").text(numeral(prev_lotout_b).format('0,0'));
              $("#prev_lotout_c").text(numeral(prev_lotout_c).format('0,0'));
              $("#prev_lotout_d").text(numeral(prev_lotout_d).format('0,0'));
              $("#prev_lotout_e").text(numeral(prev_lotout_e).format('0,0'));
              $("#prev_lotout_f").text(numeral(prev_lotout_f).format('0,0'));
              $("#prev_lotout_g").text(numeral(prev_lotout_g).format('0,0'));
              $("#prev_lotout_p").text(numeral(prev_lotout_p).format('0,0'));
              $("#prev_lotout_q").text(numeral(prev_lotout_q).format('0,0'));

              $("#prev_lotout_percen_a").text(numeral(numeral(prev_lotout_percen_a).value() * 100).format('0,0.00')).removeClass("bg-white bg-red").addClass(prev_bg_lotout_percen_a);
              $("#prev_lotout_percen_b").text(numeral(numeral(prev_lotout_percen_b).value() * 100).format('0,0.00')).removeClass("bg-white bg-red").addClass(prev_bg_lotout_percen_b);
              $("#prev_lotout_percen_c").text(numeral(numeral(prev_lotout_percen_c).value() * 100).format('0,0.00')).removeClass("bg-white bg-red").addClass(prev_bg_lotout_percen_c);
              $("#prev_lotout_percen_d").text(numeral(numeral(prev_lotout_percen_d).value() * 100).format('0,0.00')).removeClass("bg-white bg-red").addClass(prev_bg_lotout_percen_d);
              $("#prev_lotout_percen_e").text(numeral(numeral(prev_lotout_percen_e).value() * 100).format('0,0.00')).removeClass("bg-white bg-red").addClass(prev_bg_lotout_percen_e);
              $("#prev_lotout_percen_f").text(numeral(numeral(prev_lotout_percen_f).value() * 100).format('0,0.00')).removeClass("bg-white bg-red").addClass(prev_bg_lotout_percen_f);
              $("#prev_lotout_percen_g").text(numeral(numeral(prev_lotout_percen_g).value() * 100).format('0,0.00')).removeClass("bg-white bg-red").addClass(prev_bg_lotout_percen_g);
              $("#prev_lotout_percen_p").text(numeral(numeral(prev_lotout_percen_p).value() * 100).format('0,0.00')).removeClass("bg-white bg-red").addClass(prev_bg_lotout_percen_p);
              $("#prev_lotout_percen_q").text(numeral(numeral(prev_lotout_percen_q).value() * 100).format('0,0.00')).removeClass("bg-white bg-red").addClass(prev_bg_lotout_percen_q);


              prev_DiSumResult   = (numeral(prev_outdieend[0].outdieend).value() / numeral(prev_indieNow1).value()) * 100 ;
              prev_OieSumResult  = (numeral(prev_outovenend[0].outovenend).value() / numeral(prev_inovenNow1).value()) * 100 ;
              prev_WieSumResult  = (numeral(prev_outwirebondend[0].outwirebondend).value() / numeral(prev_inwirebondNow1).value()) * 100 ;
              prev_BondSumResult = (numeral(prev_outbondingend[0].outbondingend).value() / numeral(prev_inbondingNow1).value()) * 100 ;
              prev_MoldSumResult = (numeral(prev_outmoldend[0].outmoldend).value() / numeral(prev_inmoldNow1).value()) * 100 ;
              prev_OvenmoSumResult= (numeral(prev_outoven_moldend[0].outoven_moldend).value() / numeral(prev_inovenmoldNow1).value()) * 100 ;
              prev_DicerSumResult = (numeral(prev_outdicer_actend[0].outdicer_actend).value() / numeral(prev_indicerNow1).value()) * 100 ;
              prev_AppeaSumResult = (numeral(prev_outappearanceend[0].outappearanceend).value() / numeral(prev_inappearaNow1).value()) * 100 ;
              prev_ClassSumResult = (numeral(prev_outclassifyend[0].outclassifyend).value() / numeral(prev_incalssNow1).value()) * 100 ;
      

              if(prev_DiSumResult >= 100 && prev_DiSumResult != 0){var prev_a ='background-color: lime;color: #000;'}else if( prev_DiSumResult <100 && prev_DiSumResult> 0 ){ var prev_a ='background-color: red ;color: #FFF;' }else {var prev_a = "" };
              if(prev_OieSumResult >= 100 && prev_OieSumResult != 0){var prev_b ='background-color: lime;color: #000;'}else if( prev_OieSumResult <100 && prev_OieSumResult> 0){var prev_b ='background-color: red ;color: #FFF;' }else {var prev_b = ""};
              if(prev_WieSumResult >= 100 && prev_WieSumResult != 0){var prev_c ='background-color: lime;color: #000;'}else if( prev_WieSumResult <100 && prev_WieSumResult> 0 ){ var prev_c ='background-color: red ;color: #FFF;' }else {var prev_c = "" };
              if(prev_BondSumResult >= 100 && prev_BondSumResult != 0){var prev_d ='background-color: lime;color: #000;'}else if( prev_BondSumResult <100 && prev_BondSumResult> 0 ){ var prev_d ='background-color: red ;color: #FFF;' }else {var prev_d = "" };
              if(prev_MoldSumResult >= 100 && prev_MoldSumResult != 0){var prev_e ='background-color: lime;color: #000;'}else if( prev_MoldSumResult <100 && prev_MoldSumResult> 0){var prev_e ='background-color: red ;color: #FFF;' }else {var prev_e = ""};
              if(prev_DicerSumResult >= 100 && prev_DicerSumResult != 0){var prev_f ='background-color: lime;color: #000;'}else if( prev_DicerSumResult <100 && prev_DicerSumResult> 0 ){ var prev_f  ='background-color: red ;color: #FFF;' }else {var prev_f = "" };
              if(prev_OvenmoSumResult >= 100 && prev_OvenmoSumResult != 0){var prev_g ='background-color: lime;color: #000;'}else if( prev_OvenmoSumResult <100 && prev_OvenmoSumResult> 0){var prev_g ='background-color: red ;color: #FFF;' }else {var prev_g = ""};
              if(prev_AppeaSumResult >= 100 && prev_AppeaSumResult != 0){var prev_p ='background-color: lime;color: #000;'}else if( prev_AppeaSumResult <100 && prev_AppeaSumResult> 0 ){ var prev_p ='background-color: red ;color: #FFF;' }else {var prev_p = "" };
              if(prev_ClassSumResult >= 95 && prev_ClassSumResult != 0){var prev_q ='background-color: lime;color: #000;'}else if( prev_ClassSumResult <95 && prev_ClassSumResult> 0){var prev_q ='background-color: red ;color: #FFF;' }else {var prev_q = ""};

              var prev_color_out_a = "";
              var prev_color_out_b = "";
              var prev_color_out_c = "";
              var prev_color_out_d = "";
              var prev_color_out_e = "";
              var prev_color_out_f = "";
              var prev_color_out_g = "";
              var prev_color_out_p = "";
              var prev_color_out_q = "";

              var prev_color_outlot_a = "";
              var prev_color_outlot_b = "";
              var prev_color_outlot_c = "";
              var prev_color_outlot_d = "";
              var prev_color_outlot_e = "";
              var prev_color_outlot_f = "";
              var prev_color_outlot_g = "";
              var prev_color_outlot_p = "";
              var prev_color_outlot_q = "";

              if( numeral(prev_outdieend[0].outdieend).value() < numeral(prev_indieNow[0].indieNow).value() ){ prev_color_out_a = 'background-color:red; color: #FFF;' }
              if( numeral(prev_outovenend[0].outovenend).value() < numeral(prev_inovenNow[0].inovenNow).value() ){ prev_color_out_b = 'background-color:red; color: #FFF;' }
              if( numeral(prev_outwirebondend[0].outwirebondend).value() < numeral(prev_inwirebondNow[0].inwirebondNow).value() ){ prev_color_out_c = 'background-color:red; color: #FFF;' } 
              if( numeral(prev_outbondingend[0].outbondingend).value() < numeral(prev_inbondingNow[0].inbondingNow).value() ){ prev_color_out_d = 'background-color:red; color: #FFF;' } 
              if( numeral(prev_outmoldend[0].outmoldend).value() < numeral(prev_inmoldNow[0].inmoldNow).value() ){ prev_color_out_e = 'background-color:red; color: #FFF;' } 
              if( numeral(prev_outoven_moldend[0].outoven_moldend).value() < numeral(prev_inovenmoldNow[0].inovenmoldNow).value() ){ prev_color_out_f = 'background-color:red; color: #FFF;' } 
              if( numeral(prev_outdicer_actend[0].outdicer_actend).value() < numeral(prev_indicerNow[0].indicerNow).value() ){ prev_color_out_g = 'background-color:red; color: #FFF;' } 
              if( numeral(prev_outappearanceend[0].outappearanceend).value() < numeral(prev_inappearaNow[0].inappearaNow).value() ){ prev_color_out_p = 'background-color:red; color: #FFF;' } 
              if( numeral(prev_outclassifyend[0].outclassifyend).value() < numeral(prev_incalssNow[0].incalssNow).value() ){ prev_color_out_q = 'background-color:red; color: #FFF;' } 
          
              prev_strOutput = '<td  colspan="2" class=" border-right-thin ">Output (Pcs)</td>'
                      +'<td class="f17 text-center  border-right-thin v-middle" style="'+ prev_color_out_a +'"><span class="f14">'+ numeral(prev_outdieend[0].outdieend).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center  border-right-thin v-middle" style="'+ prev_color_out_b +'"><span class="f14">'+ numeral(prev_outovenend[0].outovenend).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center  border-right-thin v-middle" style="'+ prev_color_out_c +'"><span class="f14">'+ numeral(prev_outwirebondend[0].outwirebondend).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center  border-right-thin v-middle" style="'+ prev_color_out_d +'"><span class="f14">'+ numeral(prev_outbondingend[0].outbondingend).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center  border-right-thin v-middle" style="'+ prev_color_out_e +'"><span class="f14">'+ numeral(prev_outmoldend[0].outmoldend).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center  border-right-thin v-middle" style="'+ prev_color_out_f +'"><span class="f14">'+ numeral(prev_outoven_moldend[0].outoven_moldend).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center  border-right-thin v-middle" style="'+ prev_color_out_g +'"><span class="f14">'+ numeral(prev_outdicer_actend[0].outdicer_actend).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center  border-right-thin v-middle" style="'+ prev_color_out_p +'"><span class="f20">'+ numeral(prev_outappearanceend[0].outappearanceend).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center  border-right-thin v-middle" style="'+ prev_color_out_q +'"><span class="f20">'+ numeral(prev_outclassifyend[0].outclassifyend).format('0,0') +'</span></td>';
              $("#prev_Output").append(prev_strOutput);


              if( numeral(prev_outdieendlot[0].outdieendlot).value() < numeral(prev_indieNowlot[0].indieNowlot).value() ){ prev_color_outlot_a = 'background-color:red; color: #FFF;' }
              if( numeral(prev_outovenendlot[0].outovenendlot).value() < numeral(prev_inovenNowlot[0].inovenNowlot).value() ){ prev_color_outlot_b = 'background-color:red; color: #FFF;' }
              if( numeral(prev_outwirebondendlot[0].outwirebondendlot).value() < numeral(prev_inwirebondNowlot[0].inwirebondNowlot).value() ){ prev_color_outlot_c = 'background-color:red; color: #FFF;' } 
              if( numeral(prev_outbondingendlot[0].outbondingendlot).value() < numeral(prev_inbondingNowlot[0].inbondingNowlot).value() ){ prev_color_outlot_d = 'background-color:red; color: #FFF;' } 
              if( numeral(prev_outmoldendlot[0].outmoldendlot).value() < numeral(prev_inmoldNowlot[0].inmoldNowlot).value() ){ prev_color_outlot_e = 'background-color:red; color: #FFF;' } 
              if( numeral(prev_outoven_moldendlot[0].outoven_moldendlot).value() < numeral(prev_inovenmoldNowlot[0].inovenmoldNowlot).value() ){ prev_color_outlot_f = 'background-color:red; color: #FFF;' } 
              if( numeral(prev_outdicer_actendlot[0].outdicer_actendlot).value() < numeral(prev_indicerNowlot[0].indicerNowlot).value() ){ prev_color_outlot_g = 'background-color:red; color: #FFF;' } 
              if( numeral(prev_outappearanceendlot[0].outappearanceendlot).value() < numeral(prev_inappearaNowlot[0].inappearaNowlot).value() ){ prev_color_outlot_p = 'background-color:red; color: #FFF;' } 
              if( numeral(prev_outclassifyendlot[0].outclassifyendlot).value() < numeral(prev_incalssNowlot[0].incalssNowlot).value() ){ prev_color_outlot_q = 'background-color:red; color: #FFF;' } 
              
              prev_strOutputlot = '<td  colspan="2" class="border-bottom-thin border-right-thin ">Output (Lot)</td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin v-middle" style="'+ prev_color_outlot_a +'" ><span class="f20">'+ numeral(prev_outdieendlot[0].outdieendlot).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin v-middle" style="'+ prev_color_outlot_b +'" ><span class="f20">'+ numeral(prev_outovenendlot[0].outovenendlot).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin v-middle" style="'+ prev_color_outlot_c +'" ><span class="f20">'+ numeral(prev_outwirebondendlot[0].outwirebondendlot).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin v-middle" style="'+ prev_color_outlot_d +'" ><span class="f20">'+ numeral(prev_outbondingendlot[0].outbondingendlot).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin v-middle" style="'+ prev_color_outlot_e +'" ><span class="f20">'+ numeral(prev_outmoldendlot[0].outmoldendlot).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin v-middle" style="'+ prev_color_outlot_f +'" ><span class="f20">'+ numeral(prev_outoven_moldendlot[0].outoven_moldendlot).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin v-middle" style="'+ prev_color_outlot_g +'" ><span class="f20">'+ numeral(prev_outdicer_actendlot[0].outdicer_actendlot).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin v-middle" style="'+ prev_color_outlot_p +'" ><span class="f14">'+ numeral(prev_outappearanceendlot[0].outappearanceendlot).format('0,0') +'</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin v-middle" style="'+ prev_color_outlot_q +'" ><span class="f14">'+ numeral(prev_outclassifyendlot[0].outclassifyendlot).format('0,0') +'</span></td>';
              $("#prev_Outputlot").append(prev_strOutputlot);        


              prev_strResultok = '<td  colspan="2" class=" border-right-thin ">Ok</td>'
                      +'<td  class="f17 text-center border-right-thin " ><span >'+ numeral(prev_diebond_ok).format('0,0') +'</span></td>'
                      +'<td  class="f17 text-center border-right-thin " ><span >'+ numeral(prev_ovendiebond_ok).format('0,0') +'</span></td>'
                      +'<td  class="f17 text-center border-right-thin " ><span>'+  numeral(prev_wirebond_ok).format('0,0') + '</span></td>'
                      +'<td  class="f17 text-center border-right-thin " ><span >'+ numeral(prev_bondingins_ok).format('0,0') +'</span></td>'
                      +'<td  class="f17 text-center border-right-thin " ><span >'+ numeral(prev_mold_ok).format('0,0') +'</span></td>'
                      +'<td  class="f17 text-center border-right-thin " ><span >'+ numeral(prev_ovenmold_ok).format('0,0') +'</span></td>'
                      +'<td  class="f17 text-center border-right-thin " ><span >'+ numeral(prev_dicer_ok).format('0,0') +'</span></td>'
                      +'<td  class="f17 text-center border-right-thin " ><span >'+ numeral(prev_appear_ok).format('0,0') + '</span></td>'
                      +'<td  class="f17 text-center border-right-thin " ><span >'+ numeral(prev_classify_ok).format('0,0') + '</span></td>';
              $("#prev_Resultok").append(prev_strResultok);

              prev_Resultpercen = '<td  colspan="2"  class="border-bottom-thin border-right-thin " >%Ok</td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_a +'"><span >'+ numeral(prev_DiSumResult).format('0,0.00')     +'%</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_b +'"><span >'+ numeral(prev_OieSumResult).format('0,0.00')    +'%</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_c +'"><span >'+ numeral(prev_WieSumResult).format('0,0.00')    +'%</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_d +'"><span >'+ numeral(prev_BondSumResult).format('0,0.00')   +'%</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_e +'"><span >'+ numeral(prev_MoldSumResult).format('0,0.00')   +'%</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_g +'"><span >'+ numeral(prev_OvenmoSumResult).format('0,0.00') +'%</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_f +'"><span >'+ numeral(prev_DicerSumResult).format('0,0.00')  +'%</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_p +'"><span >'+ numeral(prev_AppeaSumResult).format('0,0.00')  +'%</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_q +'"><span >'+ numeral(prev_ClassSumResult).format('0,0.00')  +'%</span></td>';
              $("#prev_Resultpercen").append(prev_Resultpercen);


            
              if(prev_NgSumbonding >= 0.5){var prev_a1 ='backgrouclass="border-bottom-thin border-right-thin "nd-color: red ;color: #FFFF;'}else if( prev_ClassSumResult <100 && prev_ClassSumResult > 0){var prev_a1 ='background-color: red ;color: #FFFF;' }else {var prev_a1 = ""};
              if(prev_NgSumngmold >= 0.5){var prev_b1 ='background-color: red ;color: #FFFF;'}else if( prev_NgSumngmold <100 && prev_NgSumngmold > 0){var prev_b1 ='background-color: red ;color: #FFFF;' }else {var prev_b1 = ""};
              if(prev_NgSumngdicer >= 0.5){var prev_c1 ='background-color: red ;color: #FFFF;'}else if( prev_NgSumngdicer <100 && prev_NgSumngdicer > 0){var prev_c1 ='background-color: red ;color: #FFFF;' }else {var prev_c1 = ""};
              if(prev_NgSumngappear >= 0.5){var prev_d1 ='background-color: red ;color: #FFFF;'}else if( prev_NgSumngappear <100 && prev_NgSumngappear > 0){var prev_d1 ='background-color: red ;color: #FFFF;' }else {var prev_d1 = ""};
              if(prev_NgSumngclassify >= 0.5){var prev_e1 ='background-color: red ;color: #FFFF;'}else if( prev_NgSumngclassify <100 && prev_NgSumngclassify > 0){var prev_e1 ='background-color: red ;color: #FFFF;' }else {var prev_e1 = ""};



              prev_strPng = '<td  colspan="2" class="border-bottom-thin border-right-thin ">%NG</td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin "><span ></span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin "><span ></span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin "><span ></span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_a1 +'"><span >'+ numeral(prev_NgSumbonding).format('0,0.00') +'%</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_b1 +'"><span >'+ numeral(prev_NgSumngmold).format('0,0.00') +'%</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " ><span ></span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_c1 +'"><span >'+ numeral(prev_NgSumngdicer).format('0,0.00') +'%</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_d1 +'"><span ">'+ numeral(prev_NgSumngappear).format('0,0.00') +'%</span></td>'
                      +'<td class="f17 text-center border-bottom-thin border-right-thin " style="'+ prev_e1 +'"><span>'+ numeral(prev_NgSumngclassify).format('0,0.00') +'%</span></td>';
              $("#prev_Png").append(prev_strPng);
            
              
              $("#prev_DiSumResult").text(prev_DiSumResult);

              
              // ng detail
                if( typeof(prev_t3bonding[0]) != "undefined" ){
                      $("#prev_ant3bonding1").text(prev_t3bonding[0].ng_name);
                      $("#prev_sumant3bonding1").text(numeral((numeral(prev_t3bonding[0].sumqty).value() / numeral(prev_outbondingend2).value()) * 100).format('0,0.00'));
                }else{
                      $("#prev_ant3bonding1").text("");
                      $("#prev_sumant3bonding1").text("0");
                }

                if( typeof(prev_t3bonding[1]) != "undefined" ){
                      $("#prev_ant3bonding2").text(prev_t3bonding[1].ng_name);
                      $("#prev_sumast3bonding2").text(numeral((numeral(prev_t3bonding[1].sumqty).value() / numeral(prev_outbondingend2).value()) * 100).format('0,0.00'));
                }else{
                      $("#prev_ant3bonding2").text("");
                      $("#prev_sumast3bonding2").text("0");                
                }    
          
  
                if( typeof(prev_t3mold[0]) != "undefined" ){
                    $("#prev_ant3mold1").text(prev_t3mold[0].ng_name.substr(0,15));
                    $("#prev_sumant3mold1").text(numeral((numeral(prev_t3mold[0].sumqty).value() / numeral(prev_outmoldend2).value()) * 100).format('0,0.00'));
                }else{
                    $("#prev_ant3mold1").text("");
                    $("#prev_sumant3mold1").text("0");
                }

                if( typeof(prev_t3mold[1]) != "undefined" ){
                    $("#prev_ant3mold2").text(prev_t3mold[1].ng_name.substr(0,15));
                    $("#prev_sumant3mold2").text(numeral((numeral(prev_t3mold[1].sumqty).value() / numeral(prev_outmoldend2).value()) * 100).format('0,0.00'));
                }else{
                    $("#prev_ant3mold2").text("");
                    $("#prev_sumant3mold2").text("0");
                }


                if( typeof(prev_t3dicer[0]) != "undefined" ){
                    $("#prev_ant3dicer1").text(prev_t3dicer[0].ng_name.substr(0,15));
                    $("#prev_sumant3dicer1").text(numeral((numeral(prev_t3dicer[0].sumqty).value() / numeral(prev_outdicer_actend2).value()) * 100).format('0,0.00'));
                }else{
                    $("#prev_ant3dicer1").text("");
                    $("#prev_sumant3dicer1").text("0");
                }

                if( typeof(prev_t3dicer[1]) != "undefined" ){    
                    $("#prev_ant3dicer2").text(prev_t3dicer[1].ng_name.substr(0,15));
                    $("#prev_sumant3dicer2").text(numeral((numeral(prev_t3dicer[1].sumqty).value() / numeral(prev_outdicer_actend2).value()) * 100).format('0,0.00'));
                }else{
                    $("#prev_ant3dicer2").text("");
                    $("#prev_sumant3dicer2").text("0");
                }
              

                if( typeof(prev_t3appea[0]) != "undefined" ){
                    $("#prev_ant3appea1").text(prev_t3appea[0].ng_name.substr(0,15));
                    $("#prev_sumant3appea1").text(numeral((numeral(prev_t3appea[0].sumqty).value() / numeral(prev_outappearanceend2).value()) * 100).format('0,0.00'));
                }else{
                    $("#prev_ant3appea1").text("");
                    $("#prev_sumant3appea1").text("0");
                }

                if( typeof(prev_t3appea[1]) != "undefined" ){
                    $("#prev_ant3appea2").text(prev_t3appea[1].ng_name.substr(0,15));
                    $("#prev_sumant3appea2").text(numeral((numeral(prev_t3appea[1].sumqty).value() / numeral(prev_outappearanceend2).value()) * 100).format('0,0.00'));
                }else{
                    $("#prev_ant3appea2").text("");
                    $("#prev_sumant3appea2").text("0");
                }
              
              
                if( typeof(prev_t3classi[0]) != "undefined" ){
                    $("#prev_ant3classi1").text(prev_t3classi[0].output_name.substr(0,15));
                    $("#prev_sumant3classi1").text(numeral((numeral(prev_t3classi[0].sumng).value() / numeral(prev_outclassifyend2).value()) * 100).format('0,0.00'));
                }else{
                    $("#prev_ant3classi1").text("");
                    $("#prev_sumant3classi1").text("0");
                }
                
                if( typeof(prev_t3classi[1]) != "undefined" ){
                    $("#prev_ant3classi2").text(prev_t3classi[1].output_name.substr(0,15));
                    $("#prev_sumant3classi2").text(numeral((numeral(prev_t3classi[1].sumng).value() / numeral(prev_outclassifyend2).value()) * 100).format('0,0.00'));
                }else{
                    $("#prev_ant3classi2").text("");
                    $("#prev_sumant3classi2").text("0");
                }

            // remark 
                if( typeof(prev_remarkdie) != "undefined" ){
                      $("#prev_remarkdie_a1").text(prev_remarkdie[0].remark);
                }else{
                      $("#prev_remarkdie_a1").text("");
                }

                if( typeof(prev_remarkdie) != "undefined" ){
                      $("#prev_remarkdie_a2").text(prev_remarkdie[1].remark);
                }else{
                      $("#prev_remarkdie_a2").text("");              
                }   

                if( typeof(prev_remarkoven) != "undefined" ){
                      $("#prev_remarkoven_a1").text(prev_remarkoven[0].remark);
                }else{
                      $("#prev_remarkoven_a1").text("");
                }

                if( typeof(prev_remarkoven) != "undefined" ){
                      $("#prev_remarkoven_a2").text(prev_remarkoven[1].remark);
                }else{
                      $("#prev_remarkoven_a2").text("");              
                }

                if( typeof(prev_remarkwirebond) != "undefined" ){
                      $("#prev_remarkwirebond_a1").text(prev_remarkwirebond[0].remark);
                }else{
                      $("#prev_remarkwirebond_a1").text("");
                }

                if( typeof(prev_remarkwirebond) != "undefined" ){
                      $("#prev_remarkwirebond_a2").text(prev_remarkwirebond[1].remark);
                }else{
                      $("#prev_remarkwirebond_a2").text("");              
                }

                if( typeof(prev_remarkmold) != "undefined" ){
                      $("#prev_remarkmold_a1").text(prev_remarkmold[0].remark);
                }else{
                      $("#prev_remarkmold_a1").text("");
                }

                if( typeof(prev_remarkmold) != "undefined" ){
                      $("#prev_remarkmold_a2").text(prev_remarkmold[1].remark);
                }else{
                      $("#prev_remarkmold_a2").text("");              
                }

                if( typeof(prev_remarkovenmold) != "undefined" ){
                      $("#prev_remarkovenmold_a1").text(prev_remarkovenmold[0].remark);
                }else{
                      $("#prev_remarkovenmold_a1").text("");
                }

                if( typeof(prev_remarkovenmold) != "undefined" ){
                      $("#prev_remarkovenmold_a2").text(prev_remarkovenmold[1].remark);
                }else{
                      $("#prev_remarkovenmold_a2").text("");              
                }

                if( typeof(prev_remarkdicer) != "undefined" ){
                      $("#prev_remarkdicer_a1").text(prev_remarkdicer[0].remark);
                }else{
                      $("#prev_remarkdicer_a1").text("");
                }

                if( typeof(prev_remarkdicer) != "undefined" ){
                      $("#prev_remarkdicer_a2").text(prev_remarkdicer[1].remark);
                }else{
                      $("#prev_remarkdicer_a2").text("");              
                }

                if( typeof(prev_remarkclassif) != "undefined" ){
                      $("#prev_remarkclassif_a1").text(prev_remarkclassif[0].remark);
                }else{
                      $("#prev_remarkclassif_a1").text("");
                }

                if( typeof(prev_remarkclassif) != "undefined" ){
                      $("#prev_remarkclassif_a2").text(prev_remarkclassif[1].remark);
                }else{
                      $("#prev_remarkclassif_a2").text("");              
                }


