var costup = [ [0,200], [1000,300], [5000,900], [10000,1600], [20000,2800], [50000,6000], [10000000,1000000] ]; costpen = [ [0,20], [100,10], [300,9], [500,8], [1000,7], [3000,6], [5000,5.7], [8000,5.4], [10000,5], [20000,4.8], [10000000,4], ]; karton_kraft_400 = [ [700,1000,0], [0,10,0] ]; cifraA3_80 = [ [320,470,0], [0,10,4], [50,150,10], [100,300,20], [200,600,20], [500,1500,50], [1000,3000,100], [5000,15000,500], [10000,30000,1000], [1000000,3000000,5000] ]; cifraA3_80_0_0 = [ [340,490,0], [0,10,4], [50,25,10], [100,50,20], [200,100,20], [500,250,50], [1000,500,100], [5000,2500,500], [10000,5000,1000], [1000000,400000,5000] ]; cifraA3_80_black = [ [320,470,0], [0,10,4], [50,110,10], [100,220,20], [200,440,20], [500,1100,50], [1000,2200,100], [5000,11000,500], [10000,22000,1000], [1000000,2200000,5000] ]; ofsetB3_80 = [ [330,480,0], [0,1131,10], [100,1218,20], [200,1305,30], [300,1422,50], [500,1545,70], [700,1668,100], [1000,1853,150], [1500,2164,200], [2000,2474,200], [3000,3096,300], [4000,3718,400], [5000,4340,500], [6000,4957,600], [7000,5574,700], [8000,6192,800], [9000,6809,900], [10000,7427,1000], [12000,8794,1200], [15000,10846,1500], [18000,12898,1800], [20000,14266,2000], [25000,17685,2500], [30000,21105,3000], [40000,27944,4000], [50000,34783,5000], [1000000,695653,50000] ]; ofsetB3_80_black = [ [330,480,0], [0,687,10], [100,696,20], [200,740,30], [300,792,50], [500,901,70], [700,1010,100], [1000,1174,150], [1500,1465,200], [2000,1755,200], [3000,2335,300], [4000,2916,400], [5000,3496,500], [6000,4070,600], [7000,4644,700], [8000,5218,800], [9000,5792,900], [10000,6366,1000], [12000,7569,1200], [15000,9374,1500], [18000,11180,1800], [20000,12383,2000], [25000,15392,2500], [30000,18400,3000], [40000,24418,4000], [50000,30435,5000], [1000000,608696,50000] ]; ofsetB2_80 = [ [680,480,0], [0,2087,10], [100,2174,20], [200,2261,30], [300,2383,50], [500,2639,70], [700,2895,100], [1000,3279,150], [1500,3925,200], [2000,4572,200], [3000,5866,300], [4000,7159,400], [5000,8453,500], [6000,9740,600], [7000,11027,700], [8000,12314,800], [9000,13600,900], [10000,14887,1000], [12000,17461,1200], [15000,21322,1500], [18000,25183,1800], [20000,27757,2000], [25000,34211,2500], [30000,40664,3000], [40000,53572,4000], [50000,66479,5000], [1000000,1329566,50000] ]; ofsetB2_80_black = [ [680,480,0], [0,870,10], [100,914,20], [200,957,30], [300,1009,50], [500,1210,70], [700,1412,100], [1000,1714,150], [1500,2221,200], [2000,2729,200], [3000,3744,300], [4000,4759,400], [5000,5774,500], [6000,6787,600], [7000,7799,700], [8000,8811,800], [9000,9823,900], [10000,10835,1000], [12000,12861,1200], [15000,15900,1500], [18000,18940,1800], [20000,20966,2000], [25000,26037,2500], [30000,31108,3000], [40000,41250,4000], [50000,51392,5000], [1000000,1027827,50000] ]; var cifraA3 = [ [309,440,0], [0,20,4], [50,400,4], [100,800,6], [200,1600,10], [500,4000,15], [1000,8000,20], [5000,40000,50], [10000,80000,100], [1000000,8000000,500] ]; ofsetB3 = [ [309,480,0], [0,1566,5], [100,1827,6], [200,2087,7], [300,2270,8], [500,2747,10], [700,3224,15], [1000,3940,20], [1500,5132,25], [2000,6324,30], [3000,8709,35], [4000,11094,40], [5000,13479,50], [6000,15847,60], [7000,18216,70], [8000,20585,80], [9000,22954,90], [10000,25322,100], [12000,29708,120], [15000,36287,150], [18000,42867,180], [20000,47253,200], [25000,58218,250], [30000,69183,300], [40000,91114,400], [50000,113044,500], [1000000,2260870,1000] ]; ofsetB2 = [ [618,480,0], [0,2870,5], [100,3479,6], [200,3653,7], [300,3827,8], [500,4758,10], [700,5690,15], [1000,7087,20], [1500,9414,25], [2000,11740,30], [3000,16392,35], [4000,21044,40], [5000,25696,50], [6000,30329,60], [7000,34962,70], [8000,39595,80], [9000,44228,90], [10000,48861,100], [12000,58141,120], [15000,72061,150], [18000,85981,180], [20000,95261,200], [25000,118515,250], [30000,141769,300], [40000,188276,400], [50000,234783,500], [1000000,4695653,1000], ]; uf = [ [300,420,0], [0,100,0], [10,800,0], [100000,6000000,0] ]; uf_beer = [ [700,1000,0], [0,80,0], [10,800,0], [100000,7000000,0] ]; costst = [ [0,0], [0,0], [0,0], [0,0], [0,0], [0,0] ]; sum = [ [0], [0], [0], [0] ]; n = [ [0,1.9], [300,1.8], [500,1.75], [800,1.7], [1000,1.68], [1400,1.64], [2000,1.62], [4000,1.6], [6000,1.55], [8000,1.5], [10000,1.45], [15000,1.4], [20000,1.35], [10000000,1.3] ]; delta=3; delta_sh=6; delta_border=3; delta_border_sh=8; dopusk=2; delta_beer=4; delta_border_beer=13; costmr=2100; costmr07=4200; lengthm=30000; coststmp=550; coststmin=600; coststpovtor=300; kartonv=60; kartonb=60; printkartonv=40; printpl=30; pl=8; nitka=0.7; otd500=900; otd700=1300; aromatizaciya=0.1; ver=0.4; otd_na_cm2=0.00004; costpr=50; costud=1; kash_pr=50; kash=5; s25=150; m25=0.023; delta_apl=34; delta_bpl=30; koef_pl=1.1; priladka_upak=100; paket=0.5; upakmin=400; paketmin=300; transp_koef=0.02; transp_min=0; transp=400; amax=430; bmax=300; amax_f=260; bmax_f=170; amax_z=300; bmax_z=210; skmax=40; summax=3000000; kol_dn_baz=9; kol_st_dn=3000; kr=0.7; knds=1.2; priladka_uf=50; delta_uf=10; vikl_uf=0.5; osnastka=200; lak=10; white=20; koef_brak_arom=1.1; kol_listov_brak_arom=2; costpoklbl1=0.1; costkA1=5; costk_perepl_1mm_A1=15; skotch10x10000=15; costsbbl1=0.12; pen=3; krepl=1; sborka_fotor=0.5; sborka_zakl=0.5; skotch_m2=20; pokl_skotch_m2=5; koreshok=21; cost_kapillar=4.0; cost_pokl_kapillar=0.7; koef_kapillar=1.05; perepl_150=3; perepl_210=5; perepl_pruzhina_150=7; perepl_pruzhina_210=10; karton_kraft_800=20; flakon4_5ml=6; probka=0.7; krishka=4; shnurok300mm=0.3; sborka_korobki=0.7; sborka_bochonka=0.5; kol_st_dn_boch=400; sm=600; sm_na_cm2=0.00016; sm_rabota=0.05; skl_br=0.5; otv_br=0.5; furn_br=1.0; ust_furn_br=0.5; // КАЛЬКУЛЯТОР ДЛЯ РАССЧЁТА СТОИМОСТИ ПЛОСКИХ МАГНИТОВ function calc(radio, a7, b7, k7, s7, v7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); k = parseInt(k7); sk = parseInt(s7); v = v7; // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ ПЕЧАТЬЮ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=cifraA3[i-1][0]) {qt_page= Math.ceil(qt_page+cifraA3[i-1][2]+(cifraA3[i][2]-cifraA3[i-1][2])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])); cost_print= cifraA3[i-1][1]+(cifraA3[i][1]-cifraA3[i-1][1])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость цифровой печати" + cost_print); // стоимость магнита //costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; costm = (qt_page/2)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash* qt_page; // alert("стоимость кашировки" + costkash); sum [0]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с цифовой печатью " + sum [0]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А3 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB3[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB3[i-1][2]+(ofsetB3[i][2]-ofsetB3[i-1][2])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])); cost_print= ofsetB3[i-1][1]+(ofsetB3[i][1]-ofsetB3[i-1][1])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость офсетнй печати А3" + cost_print); // стоимость магнита costm = (qt_page/2)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash* qt_page; // alert("стоимость кашировки" + costkash); sum [1]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с офсетной печатью А3 " + sum [1]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А2 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB2[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB2[i-1][2]+(ofsetB2[i][2]-ofsetB2[i-1][2])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])); cost_print= ofsetB2[i-1][1]+(ofsetB2[i][1]-ofsetB2[i-1][1])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость офсетнй печати А2" + cost_print); // стоимость магнита costm = (qt_page)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = Math.ceil(kolg/3)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page*3; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash*2* qt_page; // alert("стоимость кашировки" + costkash); sum [2]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с офсетной печатью А2 " + sum [2]); costpl = s25; mpl = m25; apl = a + delta_apl; bpl = b * 2 + delta_bpl; spl = apl * bpl * k *koef_pl/ 1000000; mplall = spl * mpl; costplall = mplall * costpl; // alert("стоимость плёнки для упаковки " + costplall); for (var i=1; i=costup[i-1][0]) {costupak = costup[i-1][1]+(costup[i][1]-costup[i-1][1])/(costup[i][0]-costup[i-1][0])*(k-costup[i-1][0])} }; // alert("стоимость работы упаковки " + costupak); costupall = priladka_upak + costupak + costplall; // alert("стоимость упаковки " + costupall); if (costupall(k*paket)) {costupall = (k*paket)}; if (costupall= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; sumsi = sumsi * nac / kr; // alert("базовая стоимость " + sumsi); if (v == 1) { if (radio[0].checked) sumsi = sumsi; else if (radio[1].checked) sumsi = sumsi - coststmin; // alert("базовая стоимость с наличием штампа" + sumsi); if (a>amax) {ah= "Довжина виробу більша за можливу " + amax + " мм. Зверніться до наших менеджерів для розрахунку вартості."} else {ah= " "}; if (b>bmax) {bh= "Ширина виробу більша за можливу " + bmax + " мм. Зверніться до наших менеджерів для розрахунку вартості."} else {bh= " "}; if (sumsi>summax) {sumh= "Вартість виготовлення накладу більше ніж " + summax + " грн. Зверніться до наших менеджерів для розрахунку вартості."} else {sumh= " "}; if (sk>skmax) {skh= "Розмір знижки яку ви ввели перевищує можливу " + skmax + " %. Зверніться до наших менеджерів для отримання точного розміру вашої знижки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (a<=amax & b<=bmax & sumh<=summax & sk<=skmax) {sumv ="Розрахована вартість магнітів пласких " + a + "х" + b + " мм." + "\n" +"Склад:" + "\n" + "- магніт вініловий 0,4 мм;" + "\n" + "- папір крейдований 350 гр/м2;" + "\n" + "- друк 4+0;"+ "\n" + "- ламінація глянцева 1+0;"+ "\n" + "Вартість накладу " + k + " шт. з врахуванням знижки " + sk + "% складе "+ Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн з ПДВ)" + "\n" + "Термін виготовлення " + kol_dn + " днів." + "\n" + "Вартість індивідуального пакування кожного виробу в пакет поліпропіленовий складе " + Math.ceil(costupall) + " грн. (" + Math.ceil(costupall*knds) + " грн з ПДВ)"} ; }; if (v == 2) { if (radio[0].checked) sumsi = sumsi; else if (radio[1].checked) sumsi = sumsi - coststmin; // alert("базовая стоимость с наличием штампа" + sumsi); if (a>amax) {ah= "Длинна изделия больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (b>bmax) {bh= "Ширина изделия больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (a<=amax & b<=bmax & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость магнитов плоских " + a + "х" + b + " мм." + "\n" +"Состав:" + "\n" + "- магнит виниловый 0,4 мм;" + "\n" + "- бумага мелованная 350 гр/м2;" + "\n" + "- печать 4+0;"+ "\n" + "- ламинация глянцевая 1+0;"+ "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит "+ Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Стоимость индивидуальной упаковки каждого изделия в пакет полипропиленовый составит " + Math.ceil(costupall) + " грн. (" + Math.ceil(costupall*knds) + " грн с НДС)"} ; }; return sumv; } // КАЛЬКУЛЯТОР ДЛЯ РАССЧЁТА СТОИМОСТИ МАГНИТОВ С ШИЛЬДОЙ function calcmshild(radio, a7, b7, k7, s7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); k = parseInt(k7); sk = parseInt(s7); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ УФ ПЕЧАТЬЮ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(uf[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(uf[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(uf[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); qt_page=k/kol; for (var i=2; i=cifraA3[i-1][0]) {qt_page= Math.ceil(qt_page+cifraA3[i-1][2]+(cifraA3[i][2]-cifraA3[i-1][2])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])); } }; cost_print= qt_page*printpl; // alert("кол-во листов" + qt_page); // alert("стоимость цифровой печати" + cost_print); // стоимость магнита //costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; costm = (qt_page/2)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash* qt_page; // alert("стоимость кашировки" + costkash); // стоимость плёнки costpl = pl*qt_page; // alert("стоимость плёнки" + costpl); // стоимость смолы cost_sm = sm * ( sm_na_cm2 * ( a * b * kol * qt_page ) / 100); // alert("стоимость смолы" + cost_sm); // стоимость заливки sm_rab = Math.ceil ( ( sm_rabota * ( a * b * k ) / 100)); // alert("стоимость работ по заливке" + sm_rab); sumsi = sm_rab + cost_sm + costpl + cost_print + costm + costvis + costkash; sumsi = transp + transp_koef * sumsi + sumsi; //alert("себестоимость " + sumsi); for (var i=1; i= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; sumsi = sumsi * nac / kr; // alert("базовая стоимость " + sumsi); costpl = s25; mpl = m25; apl = a + delta_apl; bpl = b * 2 + delta_bpl; spl = apl * bpl * k *koef_pl/ 1000000; mplall = spl * mpl; costplall = mplall * costpl; // alert("стоимость плёнки для упаковки " + costplall); for (var i=1; i=costup[i-1][0]) {costupak = costup[i-1][1]+(costup[i][1]-costup[i-1][1])/(costup[i][0]-costup[i-1][0])*(k-costup[i-1][0])} }; // alert("стоимость работы упаковки " + costupak); costupall = priladka_upak + costupak + costplall; // alert("стоимость упаковки " + costupall); if (costupall(k*paket)) {costupall = (k*paket)}; if (costupallamax) {ah= "Длинна изделия больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (b>bmax) {bh= "Ширина изделия больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (a<=amax & b<=bmax & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость смоляных магнитов " + a + "х" + b + " мм." + "\n" +"Состав:" + "\n" + "- магнитный винил 0,4 мм;" + "\n" + "- самоклеющаяся плёнка ПВХ белая;" + "\n" + "- печать 4+0;"+ "\n" + "- смоляная линза;"+ "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит "+ Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Доставка по территории Украины за счёт РПК Магнит."+ "\n" + "Стоимость индивидуальной упаковки каждого изделия в пакет полиэтиленовый zip-lock составит " + Math.ceil(costupall) + " грн. ( " + Math.ceil(costupall*knds) + "грн с НДС)" } ; return sumv; } //КАЛЬКУЛЯТОР ДЛЯ РАСЧЁТА СТОИМОСТИ БРЕЛОКОВ ИЗ ШИЛЬД function calcbrshild(radio, a7, b7, k7, s7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); k = parseInt(k7); sk = parseInt(s7); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ УФ ПЕЧАТЬЮ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(uf[0][0]-2*(delta_border_sh-delta_sh/2))/(a+delta_sh))/1000) * Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border_sh-delta_sh/2))/(b+delta_sh))/1000); kol2 = Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border_sh-delta_sh/2))/(a+delta_sh))/1000) * Math.floor (Math.round (1000*(uf[0][0]-2*(delta_border_sh-delta_sh/2))/(b+delta_sh))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(uf[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати под тираж qt_page=k*2/kol* koef_brak_arom; cost_print= qt_page*printpl; // alert("кол-во листов" + qt_page); // alert("стоимость уф печати" + cost_print); // стоимость плёнки costpl = pl*qt_page; // alert("стоимость плёнки" + costpl); // стоимость смолы cost_sm = sm * ( sm_na_cm2 * ( a * b * k * 2 ) / 100); if (radio[0].checked) cost_sm = cost_sm; else if (radio[1].checked) cost_sm = cost_sm * 3.1415 / 4; //alert("стоимость смолы" + cost_sm); // стоимость заливки sm_rab = Math.ceil ( ( sm_rabota * ( a * b * k * 2 ) / 100)); // alert("стоимость работ по заливке" + sm_rab); sumsi = sm_rab + cost_sm + costpl + cost_print + k * ( skl_br + otv_br + furn_br + ust_furn_br ); sumsi = transp + transp_koef * sumsi + sumsi; // alert("себестоимость " + sumsi); for (var i=1; i= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; //alert("наценка" + nac); sumsi = sumsi * nac / kr; // alert("базовая стоимость " + sumsi); costpl = s25; mpl = m25; apl = a + delta_apl; bpl = b * 2 + delta_bpl; spl = apl * bpl * k *koef_pl/ 1000000; mplall = spl * mpl; costplall = mplall * costpl; // alert("стоимость плёнки для упаковки " + costplall); for (var i=1; i=costup[i-1][0]) {costupak = costup[i-1][1]+(costup[i][1]-costup[i-1][1])/(costup[i][0]-costup[i-1][0])*(k-costup[i-1][0])} }; // alert("стоимость работы упаковки " + costupak); costupall = (k*paket) * nac; if (costupallamax) {ah= "Длинна изделия больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (b>bmax) {bh= "Ширина изделия больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (a<=amax & b<=bmax & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость смоляных брелоков из двух шильд " + a + "х" + b + " мм." + "\n" +"Состав:" + "\n" + "- фурнитура брелока бюджетная (кольцо, цепочка, переходник);" + "\n" + "- самоклеющаяся плёнка ПВХ белая;" + "\n" + "- печать 4+0;"+ "\n" + "- смоляная линза;"+ "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит "+ Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Стоимость индивидуальной упаковки каждого изделия в пакет полиэтиленовый zip-lock составит " + Math.ceil(costupall) + " грн. ( " + Math.ceil(costupall*knds) + "грн с НДС)" } ; return sumv; } // КАЛЬКУЛЯТОР ДЛЯ РАССЧЁТА СТОИМОСТИ ШИЛЬД function calcshild(radio, a7, b7, k7, s7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); k = parseInt(k7); sk = parseInt(s7); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ УФ ПЕЧАТЬЮ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(uf[0][0]-2*(delta_border_sh-delta_sh/2))/(a+delta_sh))/1000) * Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border_sh-delta_sh/2))/(b+delta_sh))/1000); kol2 = Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border_sh-delta_sh/2))/(a+delta_sh))/1000) * Math.floor (Math.round (1000*(uf[0][0]-2*(delta_border_sh-delta_sh/2))/(b+delta_sh))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(uf[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(uf[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати под тираж qt_page=k/kol* koef_brak_arom; cost_print= qt_page*printpl; // alert("кол-во листов" + qt_page); // alert("стоимость уф печати" + cost_print); // стоимость плёнки costpl = pl*qt_page; // alert("стоимость плёнки" + costpl); // стоимость смолы cost_sm = sm * ( sm_na_cm2 * ( a * b * k ) / 100); if (radio[0].checked) cost_sm = cost_sm; else if (radio[1].checked) cost_sm = cost_sm * 3.1415 / 4; //alert("стоимость смолы" + cost_sm); // стоимость заливки sm_rab = Math.ceil ( ( sm_rabota * ( a * b * k ) / 100)); // alert("стоимость работ по заливке" + sm_rab); sumsi = sm_rab + cost_sm + costpl + cost_print; sumsi = transp + transp_koef * sumsi + sumsi; // alert("себестоимость " + sumsi); for (var i=1; i= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; sumsi = sumsi * nac / kr; // alert("базовая стоимость " + sumsi); // alert("базовая стоимость с наличием штампа" + sumsi); if (a>amax) {ah= "Длинна изделия больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (b>bmax) {bh= "Ширина изделия больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (a<=amax & b<=bmax & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость смоляных шильд " + a + "х" + b + " мм." + "\n" +"Состав:" + "\n" + "- подложка из силиконизированой бумаги;" + "\n" + "- самоклеющаяся плёнка ПВХ белая;" + "\n" + "- печать 4+0;"+ "\n" + "- смоляная линза;"+ "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит "+ Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Доставка по территории Украины за счёт РПК Магнит." } ; return sumv; } function calc_bochonok(radio, a7, b7, k7, s7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); k = parseInt(k7); sk = parseInt(s7); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ ПЕЧАТЬЮ // кол-ва упаковок на листе kol1 = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; //alert("кол-во на листе цифра" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=cifraA3[i-1][0]) {qt_page= Math.ceil(qt_page+cifraA3[i-1][2]+(cifraA3[i][2]-cifraA3[i-1][2])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])); cost_print= cifraA3[i-1][1]+(cifraA3[i][1]-cifraA3[i-1][1])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])} }; //alert("кол-во листов" + qt_page); //alert("стоимость цифровой печати" + cost_print); // стоимость штампа и высечки costst[0][0] = coststmp* 4 * (a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp* 4 * (a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp* 4 * (a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp* 4 * (a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость сборки коробки costkash = kash_pr + sborka_korobki * k ; //alert("стоимость сборки коробки" + costkash); sum [0]= cost_print + costvis + costkash; //alert("стоимость коробок с цифовой печатью " + sum [0]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А3 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; //alert("кол-во на листе офсет А3" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB3[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB3[i-1][2]+(ofsetB3[i][2]-ofsetB3[i-1][2])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])); cost_print= ofsetB3[i-1][1]+(ofsetB3[i][1]-ofsetB3[i-1][1])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])} }; //alert("кол-во листов" + qt_page); //alert("стоимость офсетнй печати А3" + cost_print); // стоимость штампа и высечки costst[0][0] = coststmp* 4 * (a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp* 4 * (a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp* 4 * (a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp* 4 * (a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость сборки costkash = kash_pr + sborka_korobki * k ; //alert("стоимость сборки коробки" + costkash); sum [1]= cost_print + costvis + costkash; //alert("стоимость тиража коробок с офсетной печатью А3 " + sum [1]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А2 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; //alert("кол-во на листе А2" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB2[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB2[i-1][2]+(ofsetB2[i][2]-ofsetB2[i-1][2])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])); cost_print= ofsetB2[i-1][1]+(ofsetB2[i][1]-ofsetB2[i-1][1])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])} }; //alert("кол-во листов" + qt_page); //alert("стоимость офсетнй печати А2" + cost_print); // стоимость штампа и высечки costst[0][0] = coststmp* 4 * (a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp* 4 * (a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp* 4 * (a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = Math.ceil(kolg/3)*kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page*3; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость сборки costkash = kash_pr + sborka_korobki * k ; // alert("стоимость сборки" + costkash); sum [2]= cost_print + costvis + costkash; //alert("стоимость тиража коробок с офсетной печатью А2 " + sum [2]); sumsi = sum [0]; for (var i=1; i<3 ; i++) { if (sum[i] < sumsi) { sumsi = sum[i]} }; if (radio[0].checked) {otdushka = k * (otd700 / 1000) * 4; obem = 4;} else if (radio[1].checked) {otdushka = k * (otd700 / 1000) * 5; obem = 5;} if (otdushka < otd700) { otdushka = otd700} //alert("стоимость отдушки" + otdushka); sumsi = transp + transp_koef * sumsi + sumsi + otdushka + k * flakon4_5ml + k * probka + k * krishka + k * shnurok300mm + k * sborka_korobki + k * sborka_bochonka ; //alert("себестоимость " + sumsi); for (var i=1; i= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; sumsi = sumsi * nac / kr; // alert("базовая стоимость " + sumsi); if (a == 150 & b == 100) sumsi = sumsi - coststmin; if (a>amax) {ah= "Длина выкройки коробки больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (b>bmax) {bh= "Ширина выкройки коробки больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+k/kol_st_dn_boch) * 1))/1; // alert("сроки" + kol_dn); if (a<=amax & b<=bmax & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость ароматизаторов бочонок в флаконе " + obem + " мл." +"\n" +"Состав:" + "\n" + "- флакон " + obem + " мл.;" + "\n" + "- пробка пластиковая;" + "\n" + "- крышка деревянная;" + "\n" + "- шнурок диаметром 2 мм и длиной 300 мм;" + "\n" + "- коробка из картона одностороннего мелования 250 гр/м2 с печатью 4+0 и глянцевой ламинацией;" + "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит "+ Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Доставка по территории Украины за счёт РПК Магнит." } ; return sumv; } // КАЛЬКУЛЯТОР ДЛЯ РАССЧЁТА СТОИМОСТИ МАГНИТНЫХ ЗАКЛАДОК function calc_zakl(radio, a7, b7, am7, bm7, k7, s7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); am = Math.round (parseInt(am7)); bm = Math.round (parseInt(bm7)); k = parseInt(k7); sk = parseInt(s7); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ ПЕЧАТЬЮ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; //alert("кол-во на листе" + kol); //alert("кол-во по горизонтали" + kolg); //alert("кол-во по вертикали" + kolv); //alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=cifraA3[i-1][0]) {qt_page= Math.ceil(qt_page+cifraA3[i-1][2]+(cifraA3[i][2]-cifraA3[i-1][2])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])); cost_print= cifraA3[i-1][1]+(cifraA3[i][1]-cifraA3[i-1][1])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])} }; //alert("кол-во листов" + qt_page); //alert("стоимость цифровой печати" + cost_print); costm = 2 * 1.1 * am * bm * k / 1000000; // alert("кол-во магнита" + costm); costm = costm * ( costmr / 18 + skotch_m2 + pokl_skotch_m2 ); //alert("стоимость магнита со скотчем" + costm); // стоимость штампа и высечки costst[0][0] = coststmp* 2 * (a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp* 2 * (a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp* 2 * (a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp* 2 * (a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp* 2 * (a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp* 2 * (a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; //alert("стоимость высечки" + costvis); // стоимость сборки costkash = kash_pr + sborka_zakl * k ; //alert("стоимость сборки" + costkash); sum [0]= cost_print + costm + costvis + costkash; //alert("стоимость тиража с цифовой печатью " + sum [0]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А3 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; //alert("кол-во на листе" + kol); //alert("кол-во по горизонтали" + kolg); //alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB3[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB3[i-1][2]+(ofsetB3[i][2]-ofsetB3[i-1][2])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])); cost_print= ofsetB3[i-1][1]+(ofsetB3[i][1]-ofsetB3[i-1][1])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])} }; //alert("кол-во листов" + qt_page); //alert("стоимость офсетнй печати А3" + cost_print); costm = 2 * 1.1 * am * bm * k / 1000000; //alert("кол-во магнита" + costm); costm = costm * ( costmr / 18 + skotch_m2 + pokl_skotch_m2 ); //alert("стоимость магнита со скотчем" + costm); // стоимость штампа и высечки costst[0][0] = coststmp* 2 * (a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp* 2 * (a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp* 2 * (a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp* 2 * (a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp* 2 * (a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp* 2 * (a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; //alert("стоимость высечки" + costvis); // стоимость сборки costkash = kash_pr + sborka_zakl * k ; //alert("стоимость сборки" + costkash); sum [1]= cost_print + costm + costvis + costkash; //alert("стоимость тиража с офсетной печатью А3 " + sum [1]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А2 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; //alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB2[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB2[i-1][2]+(ofsetB2[i][2]-ofsetB2[i-1][2])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])); cost_print= ofsetB2[i-1][1]+(ofsetB2[i][1]-ofsetB2[i-1][1])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])} }; //alert("кол-во листов" + qt_page); //alert("стоимость офсетнй печати А2" + cost_print); costm = 2 * 1.1 * am * bm * k / 1000000; //alert("кол-во магнита" + costm); costm = costm * ( costmr / 18 + skotch_m2 + pokl_skotch_m2 ); //alert("стоимость магнита со скотчем" + costm); // стоимость штампа и высечки costst[0][0] = coststmp* 2 * (a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp* 2 * (a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp* 2 * (a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp* 2 * (a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp* 2 * (a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = Math.ceil(kolg/3)*kolv * coststmp* 2 * (a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page*3; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; //alert("стоимость высечки" + costvis); // стоимость сборки costkash = kash_pr + sborka_zakl * k ; //alert("стоимость сборки" + costkash); sum [2]= cost_print + costm + costvis + costkash; //alert("стоимость тиража с офсетной печатью А2 " + sum [2]); costpl = s25; mpl = m25; apl = a + delta_apl; bpl = b * 2 + delta_bpl; spl = apl * bpl * k *koef_pl/ 1000000; mplall = spl * mpl; costplall = mplall * costpl; // alert("стоимость плёнки для упаковки " + costplall); for (var i=1; i=costup[i-1][0]) {costupak = costup[i-1][1]+(costup[i][1]-costup[i-1][1])/(costup[i][0]-costup[i-1][0])*(k-costup[i-1][0])} }; // alert("стоимость работы упаковки " + costupak); costupall = priladka_upak + costupak + costplall; //alert("стоимость упаковки " + costupall); if (costupall(k*paket)) {costupall = (k*paket)}; if (costupall= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; sumsi = sumsi * nac / kr; //alert("базовая стоимость " + sumsi); if (radio[0].checked) sumsi = sumsi; else if (radio[1].checked) sumsi = sumsi - coststmin; //alert("базовая стоимость с наличием штампа" + sumsi); if (a>amax_z) {ah= "Длинна изделия больше допустимой " + amax_z + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (b>bmax_z) {bh= "Ширина изделия больше допустимой " + bmax_z + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; //alert("сроки" + kol_dn); if (a<=amax_z & b<=bmax_z & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость картонных магнитных закладок " + a + "х" + b + " мм. в развороте " + "с двумя магнитами " + am + "х" + bm + " мм." +"\n" +"Состав:" + "\n" + "- магнит виниловый 0,4 мм;" + "\n" + "- картон одностороннего мелования 250 гр/м2;" + "\n" + "- печать 4+0;"+ "\n" + "- ламинация глянцевая 1+0;"+ "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит "+ Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Доставка по территории Украины за счёт РПК Магнит." + "\n" + "Стоимость индивидуальной упаковки каждого изделия в пакет полипропиленовый составит " + Math.ceil(costupall) + " грн. ( " + Math.ceil(costupall*knds) + "грн с НДС)"} ; return sumv; } // КАЛЬКУЛЯТОР ДЛЯ РАССЧЁТА СТОИМОСТИ МАГНИТНЫХ ФОТОРАМОК function calc_fotoramka(radio, a7, b7, k7, s7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); k = parseInt(k7); sk = parseInt(s7); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ ПЕЧАТЬЮ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=cifraA3[i-1][0]) {qt_page= Math.ceil(qt_page+cifraA3[i-1][2]+(cifraA3[i][2]-cifraA3[i-1][2])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])); cost_print= cifraA3[i-1][1]+(cifraA3[i][1]-cifraA3[i-1][1])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость цифровой печати" + cost_print); // стоимость магнита //costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; costm = (qt_page/2)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); coststmp = coststmp * 2; // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash* qt_page; // alert("стоимость кашировки" + costkash); sum [0]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с цифовой печатью " + sum [0]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А3 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB3[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB3[i-1][2]+(ofsetB3[i][2]-ofsetB3[i-1][2])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])); cost_print= ofsetB3[i-1][1]+(ofsetB3[i][1]-ofsetB3[i-1][1])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость офсетнй печати А3" + cost_print); // стоимость магнита costm = (qt_page/2)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash* qt_page; // alert("стоимость кашировки" + costkash); sum [1]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с офсетной печатью А3 " + sum [1]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А2 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB2[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB2[i-1][2]+(ofsetB2[i][2]-ofsetB2[i-1][2])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])); cost_print= ofsetB2[i-1][1]+(ofsetB2[i][1]-ofsetB2[i-1][1])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость офсетнй печати А2" + cost_print); // стоимость магнита costm = (qt_page)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = Math.ceil(kolg/3)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page*3; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash*2* qt_page; // alert("стоимость кашировки" + costkash); sum [2]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с офсетной печатью А2 " + sum [2]); costpl = s25; mpl = m25; apl = a + delta_apl; bpl = b * 2 + delta_bpl; spl = apl * bpl * k *koef_pl/ 1000000; mplall = spl * mpl; costplall = mplall * costpl; // alert("стоимость плёнки для упаковки " + costplall); for (var i=1; i=costup[i-1][0]) {costupak = costup[i-1][1]+(costup[i][1]-costup[i-1][1])/(costup[i][0]-costup[i-1][0])*(k-costup[i-1][0])} }; // alert("стоимость работы упаковки " + costupak); costupall = priladka_upak + costupak + costplall; // alert("стоимость упаковки " + costupall); if (costupall(k*paket)) {costupall = (k*paket)}; if (costupall= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; sumsi = sumsi * nac / kr; // alert("базовая стоимость " + sumsi); if (radio[0].checked) sumsi = sumsi; else if (radio[1].checked) sumsi = sumsi - coststmin; // alert("базовая стоимость с наличием штампа" + sumsi); coststmp = coststmp / 2; if (a>amax) {ah= "Длинна изделия больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (b>bmax) {bh= "Ширина изделия больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (a<=amax & b<=bmax & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость магнитных фоторамок " + a + "х" + b + " мм." + "\n" +"Состав:" + "\n" + "- магнит виниловый 0,4 мм;" + "\n" + "- бумага мелованная 350 гр/м2;" + "\n" + "- печать 4+0;"+ "\n" + "- ламинация глянцевая 1+0;"+ "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит "+ Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Доставка по территории Украины за счёт РПК Магнит." + "\n" + "Стоимость индивидуальной упаковки каждого изделия в пакет полипропиленовый составит " + Math.ceil(costupall) + " грн. ( " + Math.ceil(costupall*knds) + "грн с НДС)"} ; return sumv; } // КАЛЬКУЛЯТОР ДЛЯ РАСЧЁТА СТОИМОСТИ ЭКОБЛОКНОТА НА ПРУЖИНЕ function calc_bl_na_pruzhine(radio1, radio2, ab7, bb7, kb7, k7, s7) { rad1 = radio1; rad2 = radio2; ab = Math.round (parseInt(ab7)); bb = Math.round (parseInt(bb7)); kb = parseInt(kb7); k = parseInt(k7); sk = parseInt(s7); ab_karton = ab; bb_karton = bb; // ОПЕДЕЛЕНИЕ СТОИМОСТИ КАРТОНА ДЛЯ ОБЛОЖКИ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(karton_kraft_400 [0][0]-2*(delta_border-delta/2))/(ab_karton+delta))/1000) * Math.floor (Math.round (1000*(karton_kraft_400 [0][1]-2*(delta_border-delta/2))/(bb_karton+delta))/1000); kol2 = Math.floor (Math.round (1000*(karton_kraft_400 [0][1]-2*(delta_border-delta/2))/(ab_karton+delta))/1000) * Math.floor (Math.round (1000*(karton_kraft_400 [0][0]-2*(delta_border-delta/2))/(bb_karton+delta))/1000); if (kol1>kol2) {kol = kol1; kolg = Math.floor (Math.round (1000*(karton_kraft_400 [0][0]-2*(delta_border-delta/2))/(ab_karton+delta))/1000); kolv = Math.floor (Math.round (1000*(karton_kraft_400 [0][1]-2*(delta_border-delta/2))/(bb_karton+delta))/1000)} else {kol = kol2; kolg = Math.floor (Math.round (1000*(karton_kraft_400 [0][0]-2*(delta_border-delta/2))/(bb_karton+delta))/1000); kolv = Math.floor (Math.round (1000*(karton_kraft_400 [0][1]-2*(delta_border-delta/2))/(ab_karton+delta))/1000)}; //alert("кол-во обложек на листе картона 1000х700 = " + kol); if (rad2==0) cost_kraft_karton = karton_kraft_400 [1][1]; else cost_kraft_karton = karton_kraft_800; if (rad2==0) { karton_tolsch= "0,5 мм" } else { karton_tolsch= "1,3 мм" }; //alert("стоимость 1 листа картона для обложки" + cost_kraft_karton); cost_kraft_karton = cost_kraft_karton/kol * k * 2 * koef_brak_arom; //alert("стоимость картона для обложки" + cost_kraft_karton); // стоимость штампа и высечки costst[0][0] = coststpovtor; costst[0][1] = costpr + costud * k; costvis = costst[0][0] + costst[0][1]; //alert("стоимость штампа и высечки" + costvis); // БЕЗ ПЕЧАТИ стоимость бумаги для внутреннего блока kol1 = Math.floor (Math.round (1000*(cifraA3_80_0_0[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80_0_0[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3_80_0_0[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80_0_0[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=cifraA3_80_0_0[i-1][0]) {qt_page= qt_page+cifraA3_80_0_0[i][2]; cost_print= cifraA3_80_0_0[i-1][1]+(cifraA3_80_0_0[i][1]-cifraA3_80_0_0[i-1][1])/(cifraA3_80_0_0[i][0]-cifraA3_80_0_0[i-1][0])*(qt_page-cifraA3_80_0_0[i-1][0])} }; //alert("без печати кол-во листов" + qt_page); //alert("без печати стоимость бумаги" + cost_print); sum [3]= cost_print; sumbl = sum [3]; if (rad1==0) pereplet = perepl_pruzhina_150; else pereplet = perepl_pruzhina_210; //alert("стоимость одного переплёта" + pereplet); sumsi_0_0 = transp + transp_koef * ( cost_kraft_karton + costvis + sumbl + k * pereplet) + ( cost_kraft_karton + costvis + sumbl + k * pereplet); //alert("себестоимость без печати внутренего блока и ручкой без печати " + sumsi_0_0); for (var i=1; i= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi_0_0-n[i-1][0])} }; sumsi_0_0 = sumsi_0_0 * nac / kr; //alert("базовая стоимость без печати на вн блоке " + sumsi_0_0); // ПЕЧАТЬ В 1 ЦВЕТ стоимость бумаги (с печатью) для внутреннего блока kol1 = Math.floor (Math.round (1000*(cifraA3_80_black[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80_black[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3_80_black[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80_black[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=cifraA3_80_black[i-1][0]) {qt_page= qt_page+cifraA3_80_black[i][2]; cost_print= cifraA3_80_black[i-1][1]+(cifraA3_80_black[i][1]-cifraA3_80_black[i-1][1])/(cifraA3_80_black[i][0]-cifraA3_80_black[i-1][0])*(qt_page-cifraA3_80_black[i-1][0])} }; //alert("1+0 кол-во листов цифра А3 " + qt_page); //alert("1+0 стоимость печати" + cost_print); sum [3]= cost_print; kol1 = Math.floor (Math.round (1000*(ofsetB3_80_black[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3_80_black[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3_80_black[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3_80_black[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=ofsetB3_80_black[i-1][0]) {qt_page= qt_page+ofsetB3_80_black[i][2]; cost_print= ofsetB3_80_black[i-1][1]+(ofsetB3_80_black[i][1]-ofsetB3_80_black[i-1][1])/(ofsetB3_80_black[i][0]-ofsetB3_80_black[i-1][0])*(qt_page-ofsetB3_80_black[i-1][0])} }; //alert("1+0 кол-во листов офсет А3" + qt_page); //alert("1+0 стоимость печати" + cost_print); sum [4]= cost_print; kol1 = Math.floor (Math.round (1000*(ofsetB2_80_black[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2_80_black[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2_80_black[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2_80_black[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=ofsetB2_80_black[i-1][0]) {qt_page= qt_page+ofsetB2_80_black[i][2]; cost_print= ofsetB2_80_black[i-1][1]+(ofsetB2_80_black[i][1]-ofsetB2_80_black[i-1][1])/(ofsetB2_80_black[i][0]-ofsetB2_80_black[i-1][0])*(qt_page-ofsetB2_80_black[i-1][0])} }; //alert("1+0 кол-во листов офсет А2 " + qt_page); //alert("1+0 стоимость печати " + cost_print); sum [5]= cost_print; sumbl = sum [3]; for (var i=4; i<6 ; i++) { if (sum[i] < sumbl) { sumbl = sum[i]} }; //alert("1+0 самый дешёвый вариант печати блокнота, цена" + sumbl); if (rad1==0) pereplet = perepl_pruzhina_150; else pereplet = perepl_pruzhina_210; //alert("переплёт единицы, цена" + pereplet); sumsi_1_0 = transp + transp_koef * ( cost_kraft_karton + costvis + sumbl + k * pereplet) + ( cost_kraft_karton + costvis + sumbl + k * pereplet); //alert("себестоимость с 1+0 внутренего блока и ручкой без печати " + sumsi_1_0); for (var i=1; i= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi_1_0-n[i-1][0])} }; sumsi_1_0 = sumsi_1_0 * nac / kr; //alert("базовая стоимость " + sumsi_1_0); // ПОЛНОЦВЕТНАЯ ПЕЧАТЬ стоимость бумаги (с печатью) для внутреннего блока kol1 = Math.floor (Math.round (1000*(cifraA3_80[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3_80[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=cifraA3_80[i-1][0]) {qt_page= qt_page+cifraA3_80[i][2]; cost_print= cifraA3_80[i-1][1]+(cifraA3_80[i][1]-cifraA3_80[i-1][1])/(cifraA3_80[i][0]-cifraA3_80[i-1][0])*(qt_page-cifraA3_80[i-1][0])} }; //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ кол-во листов цифра А3" + qt_page); //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ стоимость печати" + cost_print); sum [3]= cost_print; kol1 = Math.floor (Math.round (1000*(ofsetB3_80[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3_80[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3_80[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3_80[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=ofsetB3_80[i-1][0]) {qt_page= qt_page+ofsetB3_80[i][2]; cost_print= ofsetB3_80[i-1][1]+(ofsetB3_80[i][1]-ofsetB3_80[i-1][1])/(ofsetB3_80[i][0]-ofsetB3_80[i-1][0])*(qt_page-ofsetB3_80[i-1][0])} }; //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ кол-во листов офсет А3" + qt_page); //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ стоимость печати" + cost_print); sum [4]= cost_print; kol1 = Math.floor (Math.round (1000*(ofsetB2_80[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2_80[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2_80[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2_80[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=ofsetB2_80[i-1][0]) {qt_page= qt_page+ofsetB2_80[i][2]; cost_print= ofsetB2_80[i-1][1]+(ofsetB2_80[i][1]-ofsetB2_80[i-1][1])/(ofsetB2_80[i][0]-ofsetB2_80[i-1][0])*(qt_page-ofsetB2_80[i-1][0])} }; //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ кол-во листов офсет А2" + qt_page); //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ стоимость печати" + cost_print); sum [5]= cost_print; sumbl = sum [3]; for (var i=4; i<6 ; i++) { if (sum[i] < sumbl) { sumbl = sum[i]} }; //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ самый дешёвый вариант печати блокнота, цена" + sumbl); if (rad1==0) pereplet = perepl_pruzhina_150; else pereplet = perepl_pruzhina_210; if (rad1==0) { pruzhina_dlina= "короткой стороне" } else { pruzhina_dlina= "длинной стороне" }; //alert("переплёт единицы, цена" + pereplet); sumsi = transp + transp_koef * ( cost_kraft_karton + costvis + sumbl + k * pereplet) + ( cost_kraft_karton + costvis + sumbl + k * pereplet); //alert("себестоимость с ПОЛНОЦВЕТНАЯ ПЕЧАТЬ внутренего блока и ручкой без печати " + sumsi); for (var i=1; i= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; sumsi = sumsi * nac / kr; //alert("базовая стоимость по последнему варианту " + sumsi); if (ab>amax) {ah= "Длинна изделия больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (bb>bmax) {bh= "Ширина изделия больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (ab<=amax & bb<=bmax & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость экоблокнотов на пружине " + ab + "х" + bb + " мм." + "\n" + "Состав:"+ "\n" + "Обложка из крафт картона толщиной " + karton_tolsch + "\n" + "Внутренний блок " + ab + "х" + bb + " мм" + "\n" + "- " + kb + " листов офсетной бумаги плотностью 80 гр/м2" + "\n" + "- переплёт на пружину по "+ pruzhina_dlina + "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит:"+ "\n" + "без печати на листах внутреннего блока " + Math.ceil(sumsi_0_0 * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi_0_0 * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "с печатью в один цвет (чёрный) 1+0 на листах внутреннего блока " + Math.ceil(sumsi_1_0 * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi_1_0 * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "с полноцветной печатью 4+0 на листах внутреннего блока " + Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Доставка по территории Украины за счёт РПК Магнит." + "\n" + "Стоимость расчитана без нанесения на обложку экоблокнота. Стоимость нанесения можно расчитать https://mag.net.ua/polnotsvetnaya-pechat-na-suvenirah/."} ; return sumv; } // КАЛЬКУЛЯТОР ДЛЯ РАСЧЁТА СТОИМОСТИ ЭКОБЛОКНОТА С КРЕПЛЕНИЕМ ДЛЯ РУЧКИ И ЭКОРУЧКОЙ function calc_bl_s_ruchkoy(radio, ab7, bb7, kb7, k7, s7) { ab = Math.round (parseInt(ab7)); bb = Math.round (parseInt(bb7)); kb = parseInt(kb7); k = parseInt(k7); sk = parseInt(s7); ab_karton = ab; bb_karton = bb; if (radio[0].checked) ab_karton = ab*2+koreshok; else if (radio[1].checked) bb_karton = bb*2+koreshok; // ОПЕДЕЛЕНИЕ СТОИМОСТИ КАРТОНА ДЛЯ ОБЛОЖКИ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(karton_kraft_400 [0][0]-2*(delta_border-delta/2))/(ab_karton+delta))/1000) * Math.floor (Math.round (1000*(karton_kraft_400 [0][1]-2*(delta_border-delta/2))/(bb_karton+delta))/1000); kol2 = Math.floor (Math.round (1000*(karton_kraft_400 [0][1]-2*(delta_border-delta/2))/(ab_karton+delta))/1000) * Math.floor (Math.round (1000*(karton_kraft_400 [0][0]-2*(delta_border-delta/2))/(bb_karton+delta))/1000); if (kol1>kol2) {kol = kol1; kolg = Math.floor (Math.round (1000*(karton_kraft_400 [0][0]-2*(delta_border-delta/2))/(ab_karton+delta))/1000); kolv = Math.floor (Math.round (1000*(karton_kraft_400 [0][1]-2*(delta_border-delta/2))/(bb_karton+delta))/1000)} else {kol = kol2; kolg = Math.floor (Math.round (1000*(karton_kraft_400 [0][0]-2*(delta_border-delta/2))/(bb_karton+delta))/1000); kolv = Math.floor (Math.round (1000*(karton_kraft_400 [0][1]-2*(delta_border-delta/2))/(ab_karton+delta))/1000)}; // alert("кол-во обложек на листе картона 1000х700 = " + kol); cost_kraft_karton = karton_kraft_400 [1][1]/kol * k * koef_brak_arom; //alert("стоимость картона" + cost_kraft_karton); // стоимость штампа и высечки costst[0][0] = coststpovtor; costst[0][1] = costpr + costud * k; costvis = costst[0][0] + costst[0][1]; //alert("стоимость штампа и высечки" + costvis); // БЕЗ ПЕЧАТИ стоимость бумаги для внутреннего блока kol1 = Math.floor (Math.round (1000*(cifraA3_80_0_0[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80_0_0[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3_80_0_0[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80_0_0[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=cifraA3_80_0_0[i-1][0]) {qt_page= qt_page+cifraA3_80_0_0[i][2]; cost_print= cifraA3_80_0_0[i-1][1]+(cifraA3_80_0_0[i][1]-cifraA3_80_0_0[i-1][1])/(cifraA3_80_0_0[i][0]-cifraA3_80_0_0[i-1][0])*(qt_page-cifraA3_80_0_0[i-1][0])} }; //alert("без печати кол-во листов" + qt_page); //alert("без печати стоимость бумаги" + cost_print); sum [3]= cost_print; sumbl = sum [3]; if (radio[0].checked) pereplet = perepl_150; else if (radio[1].checked) pereplet = perepl_210; //alert("переплёт единицы, цена" + pereplet); sumsi_0_0 = transp + transp_koef * ( cost_kraft_karton + costvis + sumbl + k * ( pen + pereplet)) + ( cost_kraft_karton + costvis + sumbl + k * ( pen + pereplet)); //alert("себестоимость без печати внутренего блока и ручкой без печати " + sumsi_0_0); for (var i=1; i= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi_0_0-n[i-1][0])} }; sumsi_0_0 = sumsi_0_0 * nac / kr; //alert("базовая стоимость без печати на вн блоке " + sumsi_0_0); // ПЕЧАТЬ В 1 ЦВЕТ стоимость бумаги (с печатью) для внутреннего блока kol1 = Math.floor (Math.round (1000*(cifraA3_80_black[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80_black[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3_80_black[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80_black[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=cifraA3_80_black[i-1][0]) {qt_page= qt_page+cifraA3_80_black[i][2]; cost_print= cifraA3_80_black[i-1][1]+(cifraA3_80_black[i][1]-cifraA3_80_black[i-1][1])/(cifraA3_80_black[i][0]-cifraA3_80_black[i-1][0])*(qt_page-cifraA3_80_black[i-1][0])} }; //alert("1+0 кол-во листов цифра А3 " + qt_page); //alert("1+0 стоимость печати" + cost_print); sum [3]= cost_print; kol1 = Math.floor (Math.round (1000*(ofsetB3_80_black[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3_80_black[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3_80_black[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3_80_black[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=ofsetB3_80_black[i-1][0]) {qt_page= qt_page+ofsetB3_80_black[i][2]; cost_print= ofsetB3_80_black[i-1][1]+(ofsetB3_80_black[i][1]-ofsetB3_80_black[i-1][1])/(ofsetB3_80_black[i][0]-ofsetB3_80_black[i-1][0])*(qt_page-ofsetB3_80_black[i-1][0])} }; //alert("1+0 кол-во листов офсет А3" + qt_page); //alert("1+0 стоимость печати" + cost_print); sum [4]= cost_print; kol1 = Math.floor (Math.round (1000*(ofsetB2_80_black[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2_80_black[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2_80_black[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2_80_black[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=ofsetB2_80_black[i-1][0]) {qt_page= qt_page+ofsetB2_80_black[i][2]; cost_print= ofsetB2_80_black[i-1][1]+(ofsetB2_80_black[i][1]-ofsetB2_80_black[i-1][1])/(ofsetB2_80_black[i][0]-ofsetB2_80_black[i-1][0])*(qt_page-ofsetB2_80_black[i-1][0])} }; //alert("1+0 кол-во листов офсет А2 " + qt_page); //alert("1+0 стоимость печати " + cost_print); sum [5]= cost_print; sumbl = sum [3]; for (var i=4; i<6 ; i++) { if (sum[i] < sumbl) { sumbl = sum[i]} }; //alert("1+0 самый дешёвый вариант печати блокнота, цена" + sumbl); if (radio[0].checked) pereplet = perepl_150; else if (radio[1].checked) pereplet = perepl_210; //alert("переплёт единицы, цена" + pereplet); sumsi_1_0 = transp + transp_koef * ( cost_kraft_karton + costvis + sumbl + k * ( pen + pereplet)) + ( cost_kraft_karton + costvis + sumbl + k * ( pen + pereplet)); //alert("себестоимость с 1+0 внутренего блока и ручкой без печати " + sumsi_1_0); for (var i=1; i= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi_1_0-n[i-1][0])} }; sumsi_1_0 = sumsi_1_0 * nac / kr; //alert("базовая стоимость " + sumsi_1_0); // ПОЛНОЦВЕТНАЯ ПЕЧАТЬ стоимость бумаги (с печатью) для внутреннего блока kol1 = Math.floor (Math.round (1000*(cifraA3_80[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3_80[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=cifraA3_80[i-1][0]) {qt_page= qt_page+cifraA3_80[i][2]; cost_print= cifraA3_80[i-1][1]+(cifraA3_80[i][1]-cifraA3_80[i-1][1])/(cifraA3_80[i][0]-cifraA3_80[i-1][0])*(qt_page-cifraA3_80[i-1][0])} }; //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ кол-во листов цифра А3" + qt_page); //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ стоимость печати" + cost_print); sum [3]= cost_print; kol1 = Math.floor (Math.round (1000*(ofsetB3_80[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3_80[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3_80[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3_80[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=ofsetB3_80[i-1][0]) {qt_page= qt_page+ofsetB3_80[i][2]; cost_print= ofsetB3_80[i-1][1]+(ofsetB3_80[i][1]-ofsetB3_80[i-1][1])/(ofsetB3_80[i][0]-ofsetB3_80[i-1][0])*(qt_page-ofsetB3_80[i-1][0])} }; //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ кол-во листов офсет А3" + qt_page); //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ стоимость печати" + cost_print); sum [4]= cost_print; kol1 = Math.floor (Math.round (1000*(ofsetB2_80[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2_80[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2_80[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2_80[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=ofsetB2_80[i-1][0]) {qt_page= qt_page+ofsetB2_80[i][2]; cost_print= ofsetB2_80[i-1][1]+(ofsetB2_80[i][1]-ofsetB2_80[i-1][1])/(ofsetB2_80[i][0]-ofsetB2_80[i-1][0])*(qt_page-ofsetB2_80[i-1][0])} }; //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ кол-во листов офсет А2" + qt_page); //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ стоимость печати" + cost_print); sum [5]= cost_print; sumbl = sum [3]; for (var i=4; i<6 ; i++) { if (sum[i] < sumbl) { sumbl = sum[i]} }; //alert("ПОЛНОЦВЕТНАЯ ПЕЧАТЬ самый дешёвый вариант печати блокнота, цена" + sumbl); if (radio[0].checked) pereplet = perepl_150; else if (radio[1].checked) pereplet = perepl_210; //alert("переплёт единицы, цена" + pereplet); sumsi = transp + transp_koef * ( cost_kraft_karton + costvis + sumbl + k * ( pen + pereplet)) + ( cost_kraft_karton + costvis + sumbl + k * ( pen + pereplet)); //alert("себестоимость с ПОЛНОЦВЕТНАЯ ПЕЧАТЬ внутренего блока и ручкой без печати " + sumsi); for (var i=1; i= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; sumsi = sumsi * nac / kr; //alert("базовая стоимость " + sumsi); if (ab>amax) {ah= "Длинна изделия больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (bb>bmax) {bh= "Ширина изделия больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (ab<=amax & bb<=bmax & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость экоблокнотов с креплением для ручки и экоручкой " + ab + "х" + bb + " мм." + "\n" + "Состав:"+ "\n" + "Обложка из крафт картона плотностью 400 гр/м2" + "\n" + "Блокнот " + ab + "х" + bb + " мм" + "\n" + "- " + kb + " листов офсетной бумаги плотностью 80 гр/м2" + "\n" + "- термоклеевое скрепление;"+ "\n" + "Экоручка " + "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит:"+ "\n" + "без печати на листах внутреннего блока " + Math.ceil(sumsi_0_0 * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi_0_0 * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "с печатью в один цвет (чёрный) 1+0 на листах внутреннего блока " + Math.ceil(sumsi_1_0 * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi_1_0 * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "с полноцветной печатью 4+0 на листах внутреннего блока " + Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Доставка по территории Украины за счёт РПК Магнит." + "\n" + "Стоимость расчитана без нанесения на обложку экоблокнота и на ручку. Стоимость нанесения можно расчитать https://mag.net.ua/polnotsvetnaya-pechat-na-suvenirah/."} ; return sumv; } // КАЛЬКУЛЯТОР ДЛЯ РАССЧЁТА СТОИМОСТИ ПЛОСКИХ МАГНИТОВ утолщённых переплётным картоном и с КАПИЛЛЯРОМ ТЕРМОМЕТРА function calc_term(radio, a7, b7, k7, s7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); k = parseInt(k7); sk = parseInt(s7); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ ПЕЧАТЬЮ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=cifraA3[i-1][0]) {qt_page= Math.ceil(qt_page+cifraA3[i-1][2]+(cifraA3[i][2]-cifraA3[i-1][2])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])); cost_print= cifraA3[i-1][1]+(cifraA3[i][1]-cifraA3[i-1][1])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость цифровой печати" + cost_print); // стоимость магнита //costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; costm = (qt_page/2)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash* qt_page; // alert("стоимость кашировки" + costkash); sum [0]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с цифовой печатью " + sum [0]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А3 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; qt_page_А3=qt_page; for (var i=2; i=ofsetB3[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB3[i-1][2]+(ofsetB3[i][2]-ofsetB3[i-1][2])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])); cost_print= ofsetB3[i-1][1]+(ofsetB3[i][1]-ofsetB3[i-1][1])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость офсетнй печати А3" + cost_print); // стоимость магнита costm = (qt_page/2)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash* qt_page; // alert("стоимость кашировки" + costkash); sum [1]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с офсетной печатью А3 " + sum [1]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А2 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB2[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB2[i-1][2]+(ofsetB2[i][2]-ofsetB2[i-1][2])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])); cost_print= ofsetB2[i-1][1]+(ofsetB2[i][1]-ofsetB2[i-1][1])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость офсетнй печати А2" + cost_print); // стоимость магнита costm = (qt_page)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = Math.ceil(kolg/3)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page*3; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash*2* qt_page; // alert("стоимость кашировки" + costkash); sum [2]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с офсетной печатью А2 " + sum [2]); costpl = s25; mpl = m25; apl = a + delta_apl; bpl = b * 2 + delta_bpl; spl = apl * bpl * k *koef_pl/ 1000000; mplall = spl * mpl; costplall = mplall * costpl; // alert("стоимость плёнки для упаковки " + costplall); for (var i=1; i=costup[i-1][0]) {costupak = costup[i-1][1]+(costup[i][1]-costup[i-1][1])/(costup[i][0]-costup[i-1][0])*(k-costup[i-1][0])} }; // alert("стоимость работы упаковки " + costupak); costupall = priladka_upak + costupak + costplall; // alert("стоимость упаковки " + costupall); if (costupall(k*paket)) {costupall = (k*paket)}; if (costupall= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; sumsi = sumsi * nac / kr; // alert("базовая стоимость " + sumsi); if (radio[0].checked) sumsi = sumsi; else if (radio[1].checked) sumsi = sumsi - coststmin; // alert("базовая стоимость с наличием штампа" + sumsi); if (a>amax) {ah= "Длинна изделия больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (b>bmax) {bh= "Ширина изделия больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (a<=amax & b<=bmax & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость магнитов с капилляром термометра " + a + "х" + b + " мм." + "\n" +"Состав:" + "\n" + "- магнит виниловый 0,4 мм;" + "\n" + "- картон переплётный 1 мм;" + "\n" + "- бумага мелованная 300 гр/м2;" + "\n" + "- печать 4+0;"+ "\n" + "- ламинация глянцевая 1+0;" + "\n" + "- капилляр термометра спиртового 50 мм;"+ "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит "+ Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Доставка по территории Украины за счёт РПК Магнит." + "\n" + "Стоимость индивидуальной упаковки каждого изделия в пакет полипропиленовый составит " + Math.ceil(costupall) + " грн. ( " + Math.ceil(costupall*knds) + "грн с НДС)"} ; return sumv; } // КАЛЬКУЛЯТОР ДЛЯ РАССЧЁТА СТОИМОСТИ НАСТОЛЬНЫХ ФОТОРАМОК function calc_fotor(radio, a7, b7, am7, bm7, k7, s7) { af = Math.round (parseInt(a7)); bf = Math.round (parseInt(b7)); a = 32 + Math.round (parseInt(a7)); b = 2.5 * Math.round (parseInt(b7)); am = Math.round (parseInt(am7)); bm = Math.round (parseInt(bm7)); k = parseInt(k7); sk = parseInt(s7); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ ПЕЧАТЬЮ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=cifraA3[i-1][0]) {qt_page= Math.ceil(qt_page+cifraA3[i-1][2]+(cifraA3[i][2]-cifraA3[i-1][2])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])); cost_print= cifraA3[i-1][1]+(cifraA3[i][1]-cifraA3[i-1][1])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость цифровой печати" + cost_print); costm = 1.1 * am * bm * k / 1000000; // alert("кол-во магнита" + costm); costm = costm * ( costmr07 / 18 + skotch_m2 + pokl_skotch_m2 ); // alert("стоимость магнита со скотчем" + costm); // стоимость штампа и высечки costst[0][0] = coststmp* 4 * (a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp* 4 * (a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp* 4 * (a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp* 4 * (a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость сборки costkash = kash_pr + sborka_fotor * k ; // alert("стоимость сборки" + costkash); sum [0]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с цифовой печатью " + sum [0]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А3 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB3[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB3[i-1][2]+(ofsetB3[i][2]-ofsetB3[i-1][2])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])); cost_print= ofsetB3[i-1][1]+(ofsetB3[i][1]-ofsetB3[i-1][1])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость офсетнй печати А3" + cost_print); costm = 1.1 * am * bm * k / 1000000; // alert("кол-во магнита" + costm); costm = costm * ( costmr07 / 18 + skotch_m2 + pokl_skotch_m2 ); // alert("стоимость магнита со скотчем" + costm); // стоимость штампа и высечки costst[0][0] = coststmp* 4 * (a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp* 4 * (a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp* 4 * (a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp* 4 * (a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость сборки costkash = kash_pr + sborka_fotor * k ; // alert("стоимость сборки" + costkash); sum [1]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с офсетной печатью А3 " + sum [1]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А2 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB2[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB2[i-1][2]+(ofsetB2[i][2]-ofsetB2[i-1][2])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])); cost_print= ofsetB2[i-1][1]+(ofsetB2[i][1]-ofsetB2[i-1][1])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость офсетнй печати А2" + cost_print); costm = 1.1 * am * bm * k / 1000000; // alert("кол-во магнита" + costm); costm = costm * ( costmr07 / 18 + skotch_m2 + pokl_skotch_m2 ); // alert("стоимость магнита со скотчем" + costm); // стоимость штампа и высечки costst[0][0] = coststmp* 4 * (a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp* 4 * (a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp* 4 * (a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = Math.ceil(kolg/3)*kolv * coststmp* 4 * (a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page*3; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость сборки costkash = kash_pr + sborka_fotor * k ; // alert("стоимость сборки" + costkash); sum [2]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с офсетной печатью А2 " + sum [2]); costpl = s25; mpl = m25; apl = af + delta_apl; bpl = bf * 2 + delta_bpl; spl = apl * bpl * k *koef_pl/ 1000000; mplall = spl * mpl; costplall = mplall * costpl; // alert("стоимость плёнки для упаковки " + costplall); for (var i=1; i=costup[i-1][0]) {costupak = costup[i-1][1]+(costup[i][1]-costup[i-1][1])/(costup[i][0]-costup[i-1][0])*(k-costup[i-1][0])} }; // alert("стоимость работы упаковки " + costupak); costupall = priladka_upak + costupak + costplall; // alert("стоимость упаковки " + costupall); if (costupall(k*paket)) {costupall = (k*paket)}; if (costupall= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; sumsi = sumsi * nac / kr; // alert("базовая стоимость " + sumsi); if (radio[0].checked) sumsi = sumsi; else if (radio[1].checked) sumsi = sumsi - coststmin; // alert("базовая стоимость с наличием штампа" + sumsi); if (af>amax_f) {ah= "Длинна изделия больше допустимой " + amax_f + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (bf>bmax_f) {bh= "Ширина изделия больше допустимой " + bmax_f + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (af<=amax_f & bf<=bmax_f & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость картонных настольных фоторамок " + af + "х" + bf + " мм." + "с магнитом " + am + "х" + bm + " мм." +"\n" +"Состав:" + "\n" + "- магнит виниловый 0,7 мм;" + "\n" + "- картон одностороннего мелования 250 гр/м2;" + "\n" + "- печать 4+0;"+ "\n" + "- ламинация глянцевая 1+0;"+ "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит "+ Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Доставка по территории Украины за счёт РПК Магнит." + "\n" + "Стоимость индивидуальной упаковки каждого изделия в пакет полипропиленовый составит " + Math.ceil(costupall) + " грн. ( " + Math.ceil(costupall*knds) + "грн с НДС)"} ; return sumv; } // МАГНИТ С БЛОКНОТОМ, КРЕПЛЕНИЕМ ДЛЯ РУЧКИ И ЭКОРУЧКОЙ function calc_m_bl_pen(radio, a7, b7, ab7, bb7, kb7, k7, s7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); ab = Math.round (parseInt(ab7)); bb = Math.round (parseInt(bb7)); kb = parseInt(kb7); k = parseInt(k7); sk = parseInt(s7); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ ПЕЧАТЬЮ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=cifraA3[i-1][0]) {qt_page= Math.ceil(qt_page+cifraA3[i-1][2]+(cifraA3[i][2]-cifraA3[i-1][2])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])); cost_print= cifraA3[i-1][1]+(cifraA3[i][1]-cifraA3[i-1][1])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость цифровой печати" + cost_print); // стоимость магнита //costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; costm = (qt_page/2)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash* qt_page; // alert("стоимость кашировки" + costkash); sum [0]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с цифовой печатью " + sum [0]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А3 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB3[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB3[i-1][2]+(ofsetB3[i][2]-ofsetB3[i-1][2])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])); cost_print= ofsetB3[i-1][1]+(ofsetB3[i][1]-ofsetB3[i-1][1])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость офсетнй печати А3" + cost_print); // стоимость магнита costm = (qt_page/2)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash* qt_page; // alert("стоимость кашировки" + costkash); sum [1]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с офсетной печатью А3 " + sum [1]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А2 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB2[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB2[i-1][2]+(ofsetB2[i][2]-ofsetB2[i-1][2])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])); cost_print= ofsetB2[i-1][1]+(ofsetB2[i][1]-ofsetB2[i-1][1])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость офсетнй печати А2" + cost_print); // стоимость магнита costm = (qt_page)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = Math.ceil(kolg/3)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page*3; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash*2* qt_page; // alert("стоимость кашировки" + costkash); sum [2]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с офсетной печатью А2 " + sum [2]); kol1 = Math.floor (Math.round (1000*(cifraA3_80[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3_80[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=cifraA3_80[i-1][0]) {qt_page= qt_page+cifraA3_80[i][2]; cost_print= cifraA3_80[i-1][1]+(cifraA3_80[i][1]-cifraA3_80[i-1][1])/(cifraA3_80[i][0]-cifraA3_80[i-1][0])*(qt_page-cifraA3_80[i-1][0])} }; costkart = qt_page/kb * costkA1/4; costkskotch = skotch10x10000 * k/(10000/bb); costpoklbl = costpoklbl1 * k; costsbbl = costsbbl1 * k; sum [3]= cost_print + costkart + costkskotch + costpoklbl + costsbbl; kol1 = Math.floor (Math.round (1000*(ofsetB3_80[0][0])/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3_80[0][1])/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3_80[0][1])/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3_80[0][0])/(b+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=ofsetB3_80[i-1][0]) {qt_page= qt_page+ofsetB3_80[i][2]; cost_print= ofsetB3_80[i-1][1]+(ofsetB3_80[i][1]-ofsetB3_80[i-1][1])/(ofsetB3_80[i][0]-ofsetB3_80[i-1][0])*(qt_page-ofsetB3_80[i-1][0])} }; costkart = qt_page/kb * costkA1/4; costkskotch = skotch10x10000 * k/(10000/bb); costpoklbl = costpoklbl1 * k; costsbbl = costsbbl1 * k; sum [4]= cost_print + costkart + costkskotch + costpoklbl + costsbbl; kol1 = Math.floor (Math.round (1000*(ofsetB2_80[0][0])/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2_80[0][1])/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2_80[0][1])/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2_80[0][0])/(b+delta))/1000); if (kol1>kol2) {kol = kol} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=ofsetB2_80[i-1][0]) {qt_page= qt_page+ofsetB2_80[i][2]; cost_print= ofsetB2_80[i-1][1]+(ofsetB2_80[i][1]-ofsetB2_80[i-1][1])/(ofsetB2_80[i][0]-ofsetB2_80[i-1][0])*(qt_page-ofsetB2_80[i-1][0])} }; costkart = qt_page/kb * costkA1/2; costkskotch = skotch10x10000 * k/(10000/bb); costpoklbl = costpoklbl1 * k; costsbbl = costsbbl1 * k; sum [5]= cost_print + costkart + costkskotch + costpoklbl + costsbbl; sumbl = sum [3]; for (var i=4; i<6 ; i++) { if (sum[i] < sumbl) { sumbl = sum[i]} }; costpl = s25; mpl = m25; apl = a + ab - 10 + delta_apl; bpl = b * 2 + delta_bpl; spl = apl * bpl * k *koef_pl/ 1000000; mplall = spl * mpl; costplall = mplall * costpl; // alert("стоимость плёнки для упаковки " + costplall); for (var i=1; i=costup[i-1][0]) {costupak = costup[i-1][1]+(costup[i][1]-costup[i-1][1])/(costup[i][0]-costup[i-1][0])*(k-costup[i-1][0])} }; // alert("стоимость работы упаковки " + costupak); costupall = priladka_upak + costupak + costplall; // alert("стоимость упаковки " + costupall); if (costupall(k*paket)) {costupall = (k*paket)}; if (costupall= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; sumsi = 1.1 * sumsi * nac / kr; // alert("базовая стоимость " + sumsi); if (radio[0].checked) sumsi = sumsi; else if (radio[1].checked) sumsi = sumsi - coststmin; // alert("базовая стоимость с наличием штампа" + sumsi); if (a>amax) {ah= "Длинна изделия больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (b>bmax) {bh= "Ширина изделия больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (a<=amax & b<=bmax & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость магнитов с блокнотом с креплением для ручки и экоручкой " + (a+ab-10) + "х" + b + " мм." + "\n" + "Состав:"+ "\n" + "Магнитная часть: " + a + "х" + b + " мм" + "\n" + "- магнит виниловый 0,4 мм;" + "\n" + "- бумага мелованная 300 гр/м2;" + "\n" + "- печать 4+0;" + "\n" + "- ламинация глянцевая 1+0;" + "\n" + "блокнот " + ab + "х" + bb + " мм" + "\n" + "- " + kb + " листов офсетной бумаги плотностью 80 гр/м2 с печатью 4+0;" + "\n" + "- подложка из картона одностороннего мелования 250 гр/м2 без печати;" + "\n" + "- термоклеевое скрепление;"+ "\n" + "Крепление для ручки из белого ПВХ 0,5 мм " + "\n" + "Экоручка белого цвета без нанесения " + "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит " + Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Доставка по территории Украины за счёт РПК Магнит." + "\n" + "Стоимость индивидуальной упаковки каждого изделия в пакет полипропиленовый составит " + Math.ceil(costupall) + " грн. ( " + Math.ceil(costupall*knds) + "грн с НДС)"} ; return sumv; } // КАЛЬКУЛЯТОР ДЛЯ РАССЧЁТА СТОИМОСТИ КОСТЕРОВ С ПРЯМОЙ ПЕЧАТЬЮ НА КАРТОНЕ BEER MATT function calccoster(radio, a7, b7, k7, s7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); k = parseInt(k7); sk = parseInt(s7); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ УФ ПЕЧАТЬЮ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(uf_beer[0][0]-2*(delta_border_beer-delta_beer/2))/(a+delta_beer))/1000) * Math.floor (Math.round (1000*(uf_beer[0][1]-2*(delta_border_beer-delta_beer/2))/(b+delta_beer))/1000); kol2 = Math.floor (Math.round (1000*(uf_beer[0][1]-2*(delta_border_beer-delta_beer/2))/(a+delta_beer))/1000) * Math.floor (Math.round (1000*(uf_beer[0][0]-2*(delta_border_beer-delta_beer/2))/(b+delta_beer))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(uf_beer[0][1]-2*(delta_border_beer-delta_beer/2))/(b+delta_beer))/1000)*(b+delta_beer)+2*(delta_border_beer-delta_beer/2); kolg = Math.floor (Math.round (1000*(uf_beer[0][0]-2*(delta_border_beer-delta_beer/2))/(a+delta_beer))/1000); kolv = Math.floor (Math.round (1000*(uf_beer[0][1]-2*(delta_border_beer-delta_beer/2))/(b+delta_beer))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(uf_beer[0][1]-2*(delta_border_beer-delta_beer/2))/(a+delta_beer))/1000)*(a+delta_beer)+2*(delta_border_beer-delta_beer/2); kolg = Math.floor (Math.round (1000*(uf_beer[0][0]-2*(delta_border_beer-delta_beer/2))/(b+delta_beer))/1000); kolv = Math.floor (Math.round (1000*(uf_beer[0][1]-2*(delta_border_beer-delta_beer/2))/(a+delta_beer))/1000)}; //alert("кол-во на листе" + kol); //alert("кол-во по горизонтали" + kolg); //alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // кол-во листов картона 700х1000 kol_kartona = koef_brak_arom * k / kol; // alert("длина остатка картона" + dlina_ostatka); // alert("кол-во изделий по длине остатка" + kol_na_dlina_ostatka); // alert("кол-во изделий на листе" + kol_na_list); // alert("кол-во картона с запасом" + kol_kartona); // стоимость печати под тираж qt_page=kol_kartona; cost_print= qt_page*printkartonv*2; // alert("кол-во листов" + qt_page); //alert("стоимость уф печати" + cost_print); // стоимость картона costk = kartonv*kol_kartona; // alert("стоимость картона" + costk); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); sum [0]= cost_print/2 + costk + costvis; sum [1]= cost_print + costk + costvis; // alert("стоимость тиража c односторонней печатью " + sum [0]); // alert("стоимость тиража с двухсторонней печатью " + sum [1]); costpl = s25; mpl = m25; apl = a + delta_apl; bpl = b * 2 + delta_bpl; spl = apl * bpl * k *koef_pl/ 1000000; mplall = spl * mpl; costplall = mplall * costpl; // alert("стоимость плёнки для упаковки " + costplall); for (var i=1; i=costup[i-1][0]) {costupak = costup[i-1][1]+(costup[i][1]-costup[i-1][1])/(costup[i][0]-costup[i-1][0])*(k-costup[i-1][0])} }; // alert("стоимость работы упаковки " + costupak); costupall = priladka_upak + costupak + costplall; // alert("стоимость упаковки " + costupall); if (costupall(k*paket)) {costupall = (k*paket)}; if (costupall= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sum [j]-n[i-1][0])} }; sum [j] = sum [j] * nac / kr; // alert("базовая стоимость " + j + " " + sum [j]); }; for (var j=0; j<2 ; j++) { if (radio[0].checked) sum [j] = sum [j]; else if (radio[1].checked) sum [j] = sum [j] - coststmin; // alert("базовая стоимость с наличием штампа" + j + " " + sum [j]); }; if (a>amax) {ah= "Длинна изделия больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (b>bmax) {bh= "Ширина изделия больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sum [1]>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для более точного расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + bh + sumh + skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz-3+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (a<=amax & b<=bmax & sk<=skmax) {sumv = sumv + "Рассчитана стоимость полноцветных картонных костеров " + a + "х" + b + " мм." + "\n" +"Состав:" + "\n" + "- картон beer mat 1,5 мм;" + "\n" + "- печать 4+0;" + "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит: "+ "\n"+ "C односторонней печатью 4+0: "+ Math.ceil(sum [0] * ((100 - sk)/100)) + " грн. (" + Math.ceil(sum [0] * knds * ((100 - sk)/100)) + " грн с НДС)"+ "\n"+ "C двухсторонней печатью 4+4: "+ Math.ceil(sum [1] * ((100 - sk)/100)) + " грн. (" + Math.ceil(sum [1] * knds * ((100 - sk)/100)) + " грн с НДС)"+ "\n" + "Срок изготовления " + kol_dn+ " - " + (kol_dn+3) + " дней." + "\n" + "Доставка по территории Украины за счёт производителя."+ "\n" + "Стоимость индивидуальной упаковки каждого изделия в пакет полипропиленовый составит " + Math.ceil(costupall) + " грн. ( " + Math.ceil(costupall*knds) + "грн с НДС)"} ; return sumv; } // КАЛЬКУЛЯТОР ДЛЯ РАССЧЁТА СТОИМОСТИ АРОМАТИЗАТОРОВ function calcarom(radio, a7, b7, k7, s7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); k = parseInt(k7); sk = parseInt(s7); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ УФ ПЕЧАТЬЮ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(uf_beer[0][0]-2*(delta_border_beer-delta_beer/2))/(a+delta_beer))/1000) * Math.floor (Math.round (1000*(uf_beer[0][1]-2*(delta_border_beer-delta_beer/2))/(b+delta_beer))/1000); kol2 = Math.floor (Math.round (1000*(uf_beer[0][1]-2*(delta_border_beer-delta_beer/2))/(a+delta_beer))/1000) * Math.floor (Math.round (1000*(uf_beer[0][0]-2*(delta_border_beer-delta_beer/2))/(b+delta_beer))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(uf_beer[0][1]-2*(delta_border_beer-delta_beer/2))/(b+delta_beer))/1000)*(b+delta_beer)+2*(delta_border_beer-delta_beer/2); kolg = Math.floor (Math.round (1000*(uf_beer[0][0]-2*(delta_border_beer-delta_beer/2))/(a+delta_beer))/1000); kolv = Math.floor (Math.round (1000*(uf_beer[0][1]-2*(delta_border_beer-delta_beer/2))/(b+delta_beer))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(uf_beer[0][1]-2*(delta_border_beer-delta_beer/2))/(a+delta_beer))/1000)*(a+delta_beer)+2*(delta_border_beer-delta_beer/2); kolg = Math.floor (Math.round (1000*(uf_beer[0][0]-2*(delta_border_beer-delta_beer/2))/(b+delta_beer))/1000); kolv = Math.floor (Math.round (1000*(uf_beer[0][1]-2*(delta_border_beer-delta_beer/2))/(a+delta_beer))/1000)}; //alert("кол-во на листе" + kol); //alert("кол-во по горизонтали" + kolg); //alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // кол-во листов картона 700х1000 kol_kartona = koef_brak_arom * k / kol; // alert("длина остатка картона" + dlina_ostatka); // alert("кол-во изделий по длине остатка" + kol_na_dlina_ostatka); // alert("кол-во изделий на листе" + kol_na_list); // alert("кол-во картона с запасом" + kol_kartona); // стоимость печати под тираж qt_page=kol_kartona; cost_print= qt_page*printkartonv*2; // alert("кол-во листов" + qt_page); //alert("стоимость уф печати" + cost_print); // стоимость картона costk = kartonv*kol_kartona; // alert("стоимость картона" + costk); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость отдушки otd1 = otd500 * Math.ceil ( ( otd_na_cm2 * ( a * b * k ) / 100)); otd2 = otd700 * Math.ceil ( ( otd_na_cm2 * ( a * b * k ) / 100)); // alert("стоимость отдушки эконом" + otd1); // alert("стоимость отдушки стандарт" + otd2); // стоимость ароматизации arom_rab = k * aromatizaciya; // alert("стоимость работ по ароматизации" + arom_rab); // стоимость стрейч нитки ver_rab = k * ver; // alert("стоимость верёвки и повязать" + ver_rab); sum [0]= cost_print + costk + costvis + otd1 + arom_rab + ver_rab; sum [1]= cost_print + costk + costvis + otd2 + arom_rab + ver_rab; sum [2]= cost_print + 2 * costk + kash_pr + kash * qt_page + costvis + 2 * otd2 + 2* arom_rab + ver_rab; // alert("стоимость тиража эконом " + sum [0]); // alert("стоимость тиража стандарт " + sum [1]); // alert("стоимость тиража премиум " + sum [2]); costpl = s25; mpl = m25; apl = a + delta_apl; bpl = b * 2 + delta_bpl; spl = apl * bpl * k *koef_pl/ 1000000; mplall = spl * mpl; costplall = mplall * costpl; // alert("стоимость плёнки для упаковки " + costplall); for (var i=1; i=costup[i-1][0]) {costupak = costup[i-1][1]+(costup[i][1]-costup[i-1][1])/(costup[i][0]-costup[i-1][0])*(k-costup[i-1][0])} }; // alert("стоимость работы упаковки " + costupak); costupall = priladka_upak + costupak + costplall; // alert("стоимость упаковки " + costupall); if (costupall(k*paket)) {costupall = (k*paket)}; if (costupall= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sum [j]-n[i-1][0])} }; sum [j] = 1.1 * sum [j] * nac / kr; // alert("базовая стоимость " + j + " " + sum [j]); }; for (var j=0; j<3 ; j++) { if (radio[0].checked) sum [j] = sum [j]; else if (radio[1].checked) sum [j] = sum [j] - coststmin; // alert("базовая стоимость с наличием штампа" + j + " " + sum [j]); }; if (a>amax) {ah= "Длинна изделия больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (b>bmax) {bh= "Ширина изделия больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sum [1]>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для более точного расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + bh + sumh + skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (a<=amax & b<=bmax & sk<=skmax) {sumv = sumv + "Рассчитана стоимость полноцветных картонных автомобильных ароматизаторов " + a + "х" + b + " мм." + "\n" +"Состав:" + "\n" + "- картон высококапиллярный 1,7 мм;" + "\n" + "- печать 4+4;"+ "\n" + "- отдушка на выбор;"+ "\n" + "- подвес из нитки стрейч;"+ "\n" + "- упаковка каждого изделия в прозрачный герметичный пакет флоу пак;" + "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит: "+ "\n"+ "Вариант 'Эконом' (5 ароматов на выбор, срок службы 4-5 дней): "+ Math.ceil(sum [0] * ((100 - sk)/100)) + " грн. (" + Math.ceil(sum [0] * knds * ((100 - sk)/100)) + " грн с НДС)"+ "\n"+ "Вариант 'Стандарт' (10 ароматов на выбор, срок службы 5-10 дней): "+ Math.ceil(sum [1] * ((100 - sk)/100)) + " грн. (" + Math.ceil(sum [1] * knds * ((100 - sk)/100)) + " грн с НДС)"+ "\n"+ "Вариант 'Премиум' (20 ароматов на выбор, срок службы до 20 дней): "+ Math.ceil(sum [2] * ((100 - sk)/100)) + " грн. (" + Math.ceil(sum [2] * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn+ " - " + (kol_dn+3) + " дней." + "\n" + "Доставка по территории Украины за счёт производителя."} ; return sumv; } // _____________________________________________________________________________________________________________________________________________________________________ function calc_m_bl(radio, a7, b7, ab7, bb7, kb7, k7, s7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); ab = Math.round (parseInt(ab7)); bb = Math.round (parseInt(bb7)); kb = parseInt(kb7); k = parseInt(k7); sk = parseInt(s7); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ЦИФРОВОЙ ПЕЧАТЬЮ // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(cifraA3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(cifraA3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=cifraA3[i-1][0]) {qt_page= Math.ceil(qt_page+cifraA3[i-1][2]+(cifraA3[i][2]-cifraA3[i-1][2])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])); cost_print= cifraA3[i-1][1]+(cifraA3[i][1]-cifraA3[i-1][1])/(cifraA3[i][0]-cifraA3[i-1][0])*(qt_page-cifraA3[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость цифровой печати" + cost_print); // стоимость магнита //costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; costm = (qt_page/2)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash* qt_page; // alert("стоимость кашировки" + costkash); sum [0]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с цифовой печатью " + sum [0]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А3 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB3[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB3[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB3[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB3[i-1][2]+(ofsetB3[i][2]-ofsetB3[i-1][2])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])); cost_print= ofsetB3[i-1][1]+(ofsetB3[i][1]-ofsetB3[i-1][1])/(ofsetB3[i][0]-ofsetB3[i-1][0])*(qt_page-ofsetB3[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость офсетнй печати А3" + cost_print); // стоимость магнита costm = (qt_page/2)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page/2)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = kol * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash* qt_page; // alert("стоимость кашировки" + costkash); sum [1]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с офсетной печатью А3 " + sum [1]); // ОПЕДЕЛЕНИЕ СТОИМОСТИ ТИРАЖА С ОФСЕТНОЙ ПЕЧАТЬЮ А2 // кол-во изделий на листе kol1 = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); if (kol1>kol2) {kol = kol1; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)*(b+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(a+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(b+delta))/1000)} else {kol = kol2; lenght = dopusk + Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)*(a+delta)+2*(delta_border-delta/2); kolg = Math.floor (Math.round (1000*(ofsetB2[0][0]-2*(delta_border-delta/2))/(b+delta))/1000); kolv = Math.floor (Math.round (1000*(ofsetB2[0][1]-2*(delta_border-delta/2))/(a+delta))/1000)}; // alert("кол-во на листе" + kol); // alert("кол-во по горизонтали" + kolg); // alert("кол-во по вертикали" + kolv); // alert("длина листа после обрезки" + lenght); // стоимость печати с ламинацией под тираж qt_page=k/kol; for (var i=2; i=ofsetB2[i-1][0]) {qt_page= Math.ceil(qt_page+ofsetB2[i-1][2]+(ofsetB2[i][2]-ofsetB2[i-1][2])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])); cost_print= ofsetB2[i-1][1]+(ofsetB2[i][1]-ofsetB2[i-1][1])/(ofsetB2[i][0]-ofsetB2[i-1][0])*(qt_page-ofsetB2[i-1][0])} }; // alert("кол-во листов" + qt_page); // alert("стоимость офсетнй печати А2" + cost_print); // стоимость магнита costm = (qt_page)/Math.ceil(lengthm/lenght) // alert("кол-во магнита" + costm); costm = (qt_page)/Math.ceil(lengthm/lenght) * costmr; // alert("стоимость магнита" + costm); // стоимость штампа и высечки costst[0][0] = coststmp*(a*2 + b*2)/1000; if (costst[0][0] < coststmin) costst[0][0] = coststmin; costst[0][1] = costpr + costud * qt_page * kol; costst[1][0] = kolg * coststmp*(a*2 + b*2)/1000; if (costst[1][0] < coststmin) costst[1][0] = coststmin; costst[1][1] = costpr + costud * qt_page * kolv; costst[2][0] = kolv * coststmp*(a*2 + b*2)/1000; if (costst[2][0] < coststmin) costst[2][0] = coststmin; costst[2][1] = costpr + costud * qt_page * kolg; costst[3][0] = Math.ceil(kolv/2)*kolg * coststmp*(a*2 + b*2)/1000; if (costst[3][0] < coststmin) costst[3][0] = coststmin; costst[3][1] = costpr + costud * qt_page * 2; costst[4][0] = Math.ceil(kolg/2)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[4][0] < coststmin) costst[4][0] = coststmin; costst[4][1] = costpr + costud * qt_page * 2; costst[5][0] = Math.ceil(kolg/3)*kolv * coststmp*(a*2 + b*2)/1000; if (costst[5][0] < coststmin) costst[5][0] = coststmin; costst[5][1] = costpr + costud * qt_page*3; costvis = costst[0][0] + costst[0][1]; for (var i=1; i<6 ; i++) { if ((costst[i][0] + costst[i][1]) < costvis) { costvis = (costst[i][0] + costst[i][1])} }; // alert("стоимость высечки" + costvis); // стоимость кашировки costkash = kash_pr + kash*2* qt_page; // alert("стоимость кашировки" + costkash); sum [2]= cost_print + costm + costvis + costkash; // alert("стоимость тиража с офсетной печатью А2 " + sum [2]); kol1 = Math.floor (Math.round (1000*(cifraA3_80[0][0])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80[0][1])/(bb+delta))/1000); kol2 = Math.floor (Math.round (1000*(cifraA3_80[0][1])/(ab+delta))/1000) * Math.floor (Math.round (1000*(cifraA3_80[0][0])/(bb+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=cifraA3_80[i-1][0]) {qt_page= qt_page+cifraA3_80[i][2]; cost_print= cifraA3_80[i-1][1]+(cifraA3_80[i][1]-cifraA3_80[i-1][1])/(cifraA3_80[i][0]-cifraA3_80[i-1][0])*(qt_page-cifraA3_80[i-1][0])} }; costkart = qt_page/kb * costkA1/4; costkskotch = skotch10x10000 * k/(10000/bb); costpoklbl = costpoklbl1 * k; costsbbl = costsbbl1 * k; sum [3]= cost_print + costkart + costkskotch + costpoklbl + costsbbl; kol1 = Math.floor (Math.round (1000*(ofsetB3_80[0][0])/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3_80[0][1])/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB3_80[0][1])/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB3_80[0][0])/(b+delta))/1000); if (kol1>kol2) {kol = kol1} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=ofsetB3_80[i-1][0]) {qt_page= qt_page+ofsetB3_80[i][2]; cost_print= ofsetB3_80[i-1][1]+(ofsetB3_80[i][1]-ofsetB3_80[i-1][1])/(ofsetB3_80[i][0]-ofsetB3_80[i-1][0])*(qt_page-ofsetB3_80[i-1][0])} }; costkart = qt_page/kb * costkA1/4; costkskotch = skotch10x10000 * k/(10000/bb); costpoklbl = costpoklbl1 * k; costsbbl = costsbbl1 * k; sum [4]= cost_print + costkart + costkskotch + costpoklbl + costsbbl; kol1 = Math.floor (Math.round (1000*(ofsetB2_80[0][0])/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2_80[0][1])/(b+delta))/1000); kol2 = Math.floor (Math.round (1000*(ofsetB2_80[0][1])/(a+delta))/1000) * Math.floor (Math.round (1000*(ofsetB2_80[0][0])/(b+delta))/1000); if (kol1>kol2) {kol = kol} else {kol = kol2}; qt_page=k*kb/kol; for (var i=2; i=ofsetB2_80[i-1][0]) {qt_page= qt_page+ofsetB2_80[i][2]; cost_print= ofsetB2_80[i-1][1]+(ofsetB2_80[i][1]-ofsetB2_80[i-1][1])/(ofsetB2_80[i][0]-ofsetB2_80[i-1][0])*(qt_page-ofsetB2_80[i-1][0])} }; costkart = qt_page/kb * costkA1/2; costkskotch = skotch10x10000 * k/(10000/bb); costpoklbl = costpoklbl1 * k; costsbbl = costsbbl1 * k; sum [5]= cost_print + costkart + costkskotch + costpoklbl + costsbbl; sumbl = sum [3]; for (var i=4; i<6 ; i++) { if (sum[i] < sumbl) { sumbl = sum[i]} }; costpl = s25; mpl = m25; apl = a + ab - 10 + delta_apl; bpl = b * 2 + delta_bpl; spl = apl * bpl * k *koef_pl/ 1000000; mplall = spl * mpl; costplall = mplall * costpl; // alert("стоимость плёнки для упаковки " + costplall); for (var i=1; i=costup[i-1][0]) {costupak = costup[i-1][1]+(costup[i][1]-costup[i-1][1])/(costup[i][0]-costup[i-1][0])*(k-costup[i-1][0])} }; // alert("стоимость работы упаковки " + costupak); costupall = priladka_upak + costupak + costplall; // alert("стоимость упаковки " + costupall); if (costupall(k*paket)) {costupall = (k*paket)}; if (costupall= n[i-1][0]) {nac = n[i-1][1] + (n[i][1]-n[i-1][1]) / (n[i][0]-n[i-1][0]) * (sumsi-n[i-1][0])} }; sumsi = 1.1 * sumsi * nac / kr; // alert("базовая стоимость " + sumsi); if (radio[0].checked) sumsi = sumsi; else if (radio[1].checked) sumsi = sumsi - coststmin; // alert("базовая стоимость с наличием штампа" + sumsi); if (a>amax) {ah= "Длинна изделия больше допустимой " + amax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {ah= " "}; if (b>bmax) {bh= "Ширина изделия больше допустимой " + bmax + " мм. Обратитесь к нашим менеджерам для расчёта стоимости."} else {bh= " "}; if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = ah + "\n" + bh+ "\n" + sumh + "\n"+ skh + "\n" ; kol_dn = (Math.ceil((kol_dn_baz+qt_page/kol_st_dn) * 1))/1; // alert("сроки" + kol_dn); if (a<=amax & b<=bmax & sumh<=summax & sk<=skmax) {sumv ="Рассчитана стоимость магнитов с блокнотом " + (a+ab-10) + "х" + b + " мм." + "\n" + "Состав:"+ "\n" + "Магнитная часть: " + a + "х" + b + " мм" + "\n" + "- магнит виниловый 0,4 мм;" + "\n" + "- бумага мелованная 300 гр/м2;" + "\n" + "- печать 4+0;" + "\n" + "- ламинация глянцевая 1+0;" + "\n" + "блокнот " + ab + "х" + bb + " мм" + "\n" + "- " + kb + " листов офсетной бумаги плотностью 80 гр/м2 с печатью 4+0;" + "\n" + "- подложка из картона одностороннего мелования 250 гр/м2 без печати;" + "\n" + "- термоклеевое скрепление;" + "\n" + "Стоимость тиража " + k + " шт. с учётом скидки " + sk + "% составит " + Math.ceil(sumsi * ((100 - sk)/100)) + " грн. (" + Math.ceil(sumsi * knds * ((100 - sk)/100)) + " грн с НДС)" + "\n" + "Срок изготовления " + kol_dn + " дней." + "\n" + "Доставка по территории Украины за счёт РПК Магнит." + "\n" + "Стоимость индивидуальной упаковки каждого изделия в пакет полипропиленовый составит " + Math.ceil(costupall) + " грн. ( " + Math.ceil(costupall*knds) + "грн с НДС)"} ; return sumv; } function calc_print_uf(o7, w7, a7, b7, ab7, bb7, k7) { a = Math.round (parseInt(a7)); b = Math.round (parseInt(b7)); ab = Math.round (parseInt(ab7)); bb = Math.round (parseInt(bb7)); k = parseInt(k7); // кол-во изделий на столе kol1 = Math.floor (Math.round (1000*(uf[0][0])/(a+delta_uf))/1000) * Math.floor (Math.round (1000*(uf[0][1])/(b+delta_uf))/1000); kol2 = Math.floor (Math.round (1000*(uf[0][0])/(b+delta_uf))/1000) * Math.floor (Math.round (1000*(uf[0][1])/(a+delta_uf))/1000); if (kol1>kol2) {kol = kol1; } else {kol = kol2; }; //alert("кол-во на листе" + kol); // стоимость печати по кол-ву листов qt_page=k/kol; for (var i=2; i=uf[i-1][0]) {cost_print= uf[i-1][1]+(uf[i][1]-uf[i-1][1])/(uf[i][0]-uf[i-1][0])*(qt_page-uf[i-1][0])} }; //alert("кол-во cтолов" + qt_page); //alert("стоимость уф печати по столам" + cost_print); koef_z=1; if ((ab*bb*kol/(uf[0][0]*uf[0][1]))<0.4) {koef_z=0.7; } if ((ab*bb*kol/(uf[0][0]*uf[0][1]))>0.8) {koef_z=1.2; } //alert("коэффициент" + koef_z); cost_print = koef_z * (cost_print); //alert("стоимость уф печати по столам и выкладке c коэффициентом" + cost_print); cost_print = cost_print + k * vikl_uf; //alert("стоимость уф печати по столам и выкладке" + cost_print); cost_print = priladka_uf + cost_print; //alert("стоимость уф печати по столам и выкладке c коэффициентом с приладкой" + cost_print); osnastka_m = " "; white_m = " "; if (o7.checked) {cost_print = cost_print + osnastka; osnastka_m = ", с учетом стоимости изготовления оснастки для печати";} if (w7.checked) {cost_print = cost_print + qt_page * koef_z* white; white_m = ", с учетом печати белым цветом";} //alert("стоимость уф печати по столам и выкладке c коэффициентом с приладкой и с радио" + cost_print); sumv1 ="Рассчитана стоимость нанесения " + ab + "х" + bb + " мм" +" на предмет " + a + "х" + b + " мм" + osnastka_m + white_m + "\n" + "Стоимость печати " + k + " шт составит "+ Math.ceil(cost_print) + " грн. (" + Math.ceil(cost_print * knds) + " грн с НДС)" + "\n" + "Без учета стоимости доставки. Стоимость распаковки запакованой продукции и обратной упаковки рассчитывается отдельно." return sumv1; } // КАЛЬКУЛЯТОР ДЛЯ ПОЛНОЦВЕТНЫХ ЭКОРУЧЕК function calc_ecopen(k7, s7, v7) { k = parseInt(k7); sk = parseInt(s7); v = v7; for (var i=1; i=costpen[i-1][0]) {cost_one_pen=costpen[i-1][1]} }; kol_dn = (Math.ceil((kol_dn_baz-3+k/1000) * 1))/1; sumsi = cost_one_pen * k; if (sumsi<500) sumsi = 500; sumsi = sumsi / kr; if (v == 1) { if (sumsi>summax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv = sumh + "\n"+ skh + "\n" ; if (sumsisummax) {sumh= "Стоимость изготовления тиража превышает " + summax + " грн. Обратитесь к нашим менеджерам для расчёта стоимости."} else {sumh= " "}; if (sk>skmax) {skh= "Введённый размер скидки превышает " + skmax + " %. Обратитесь к нашим менеджерам для получения точного размера скидки."} else {skh= " "}; sumv =" " ; if (sumsi