Browse Source

Fix qrcode in Billing (bm_show_document)

Piotr Labudda 11 years ago
parent
commit
a5be8f3db4
1 changed files with 1 additions and 5 deletions
  1. 1 5
      SE/se-lib/Billing_html.php

+ 1 - 5
SE/se-lib/Billing_html.php

@@ -648,11 +648,7 @@ $do_rozliczenia = $this->SZUKAJ_NIEROZLICZONEJ_TRANSAKCJI('PRAWO',$fv_naglowek['
 				$qr_tytul=$doc->result_BILLING_NUMBERS_TYPE['DESC']." nr ".$doc->header->NUMBER."/".$doc->header->ID_BILLING_PREFIXES;
 				$qr_text=$qr_nip."|PL|".$qr_nr_rach."|".$qr_kwota."|".$qr_odbiorca."|".$qr_tytul."|||";
 				$qr_text=iconv("iso-8859-2","utf-8",$qr_text);
-				if ($file_png=tempnam('/tmp','qr-')) {
-				        QRcode::png($qr_text,$file_png,"L",2,2);
-					$qr_png=file_get_contents($file_png);
-					unlink($file_png);
-				}
+				$qr_png = shell_exec("/opt/local/bin/qrencode -o - -s 2 -l L -m 2 '".$qr_text."'");
 				if ($qr_png) $echox.="<img alt=\"QR\" src=\"data:image/png;base64,".base64_encode($qr_png)."\"><br>Skanuj i płać";
 				$echox .="</td><td align=\"right\">";
 				$echox .= $this->tab_top(1,"auto");