$res .= '</dt>';
$res .= '<dd>';
$res .= '<select name="methode_paiement">
-<option name="CB">Carte bancaire</option>
-<option name="ESPECES">Espèces</option>
-<option name="CHEQUE">Chèque</option>
-<option name="VIREMENT">Virement</option>
-<option name="SOGENACTIF">Sogenactif</option>
+<option value="CB">Carte bancaire</option>
+<option value="ESPECES">Espèces</option>
+<option value="CHEQUE">Chèque</option>
+<option value="VIREMENT">Virement</option>
+<option value="SOGENACTIF">Sogenactif</option>
</select>';
$res .= '</dd>';
$res .= '</div>';
$this->disableLayout(true);
$p = $this->_parseParams();
+ $url = str_replace('https://dev', 'https://www', SITE_URL . '/devis/index/' . $p[0] . '/' . $p[1] . "?print=1&j=" . time());
+ $format = '210mm*297mm*0*0*0*0';
+
$file = CubeIT_Files::tempnam();
$f = $file . '.pdf';
-
- $url = SITE_URL . '/devis/index/' . $p[0] . '/' . $p[1] . "?print=1&j=" . time();
-
- CubeIT_CommandLine_Phantomjs::html2pdf($url, $f, '210mm*297mm*0*0*0*0');
+ CubeIT_CommandLine_Phantomjs::html2pdf($url, $f, $format);
$response = $this->getResponse();
$response->setHeader('Content-type', CubeIT_Files::getMimeType('file.pdf'))
->setBody(file_get_contents($f));
+ // ->setBody(file_get_contents('https://extranet.cubedesigners.com/tools/phantomjs?url=' . urlencode($url) . '&pageformat=' . $format));
+
$response->sendResponse();
}
* {
background-repeat: repeat;
vertical-align: top;
- -webkit-print-color-adjust: exact !important; /* Chrome, Safari 6 – 15.3, Edge */
- color-adjust: exact !important; /* Firefox 48 – 96 */
- print-color-adjust: exact !important; /* Firefox 97+, Safari 15.4+ */
}
body {