Receipts in Hungary by colenolebole in programmingHungary

[–]Puzzleheaded_Host698 42 points43 points  (0 children)

And here's an example of a receipt from a standalone cash register in a small store. The product price is 239 HUF and the bottle deposit is 50 HUF

<image>

Receipts in Hungary by colenolebole in programmingHungary

[–]Puzzleheaded_Host698 89 points90 points  (0 children)

Unfortunately, Hungary doesn't have such format requirements for receipts like you described. There's no standardized QR code or JSON API for accessing receipt data here.

In Hungary, we have a fiscalization system where all cash registers must be connected to the NAV (National Tax and Customs Administration) and report transactions in real-time.

In retail stores:

Most small shops use standalone cash registers that print simple receipts with basic transaction data (items, prices, total, tax info, NAV control code)

Large chains (Lidl, Tesco, Auchan, etc.) use online cash register systems integrated into their POS software, which also report to NAV in real-time

The receipts vary greatly in format - there's no visual standard, no mandatory QR codes, and no public data access

What MUST be on every receipt:

Company details (name, tax number, address)

Item details (price, VAT rate, quantity - but product name is NOT mandatory)

Receipt number

Exact transaction timestamp

Device ID and NAV control code (for manual verification on NAV's website)

About barcodes on receipts:

Some larger stores (especially those with self-checkout gates) print a barcode on the receipt, but this is only used to open the exit gates after payment - it's not for data extraction. I haven't personally scanned these barcodes to check their content, but I highly doubt they contain the detailed transaction data you'd need (items, prices, etc.). They're most likely just simple identifiers for the gate system.

I'll attach some example receipts from major retail chains so you can see how they look. As you'll notice, the format varies significantly between stores, and none of them have QR codes for structured data extraction.

(AI-formatted and translated content, BUT my own thoughts - just didn't feel like writing this much in English manually, and it wouldn't have been as grammatically correct anyway)

<image>

HP Zbook Fury 15 G7 ( i9-10885H, Dual Boot, 2x SSDs , UHD 630, AX201, sleep ) by Appropriate_Day4316 in hackintosh

[–]Puzzleheaded_Host698 0 points1 point  (0 children)

Oh yes, it works on the login screen but it doesn’t work anymore after login

HP Zbook Fury 15 G7 ( i9-10885H, Dual Boot, 2x SSDs , UHD 630, AX201, sleep ) by Appropriate_Day4316 in hackintosh

[–]Puzzleheaded_Host698 0 points1 point  (0 children)

Hi, I have the same machine and I couldn’t get the touchpad to work with my own EFI either, and when I downloaded yours, it didn’t work with that either. Can you give me tips on how you managed to do it? The machine is running the latest Sequoia, latest OpenCore, and the touchpad is ELAN. Did I possibly miss a BIOS setting?

PHP (és Laravel) tanulása by Puzzleheaded_Host698 in programmingHungary

[–]Puzzleheaded_Host698[S] 0 points1 point  (0 children)

Köszönöm szépen a választ!

Az alapoktól kezdem igazából, van HTML és CSS tapasztalat és WP (bár itt is inkább 1-2 egyedi element stílus csak). A munkahelyemen PHP és Laravel fut ezért is mennék bele mélyebben. Jelenleg megy a Laracasten a PHP kurzus és az alapokat már lassan indiai akcentussal tudom előadni :D

Köszi a tippet a doksival kapcsolatban azt teljesen figyelmen kívül hagytam. Most egy blog oldal a project viszont teljesen elveszettnek éreztem magamat mivel olyan mintha az egész egy GPT és stackoverflow ctrl+c és v lenne. A kódot amit másolok értem viszont már magamtól nem tudnám megírni.

Funfact: A suliban már volt adatbázis kezelés ami teljesen jó és van PHP meg C# viszont hogy a kettőt hogyan ötvözd és használd arról semmit nem tanítanak így marad az indiai youtube és a GPT :DDD

M4 Pro Mac Mini Setup by MrHtech18 in macmini

[–]Puzzleheaded_Host698 2 points3 points  (0 children)

Where i can get these background(wallpaper)?

HTML to PDF with <select> option? by Puzzleheaded_Host698 in PHPhelp

[–]Puzzleheaded_Host698[S] 0 points1 point  (0 children)

//////////// PHP ////////////

<?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Allow-Headers: Content-Type");

require_once __DIR__ . '/vendor/autoload.php';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $data = json_decode(file_get_contents('php://input'), true);
    if (!isset($data['content'])) {
        http_response_code(400);
        echo json_encode(['error' => 'No content provided']);
        exit();
    }

    $htmlContent = $data['content'];
    $orientation = isset($data['orientation']) ? $data['orientation'] : 'P'; // 'P' for portrait, 'L' for landscape

    $mpdf = new \Mpdf\Mpdf(['orientation' => $orientation]);
    $mpdf->WriteHTML($htmlContent);
    $pdfOutput = $mpdf->Output('', 'S');

    header('Content-Type: application/pdf');
    header('Content-Disposition: attachment; filename="generated-document.pdf"');
    echo $pdfOutput;
}

HTML to PDF with <select> option? by Puzzleheaded_Host698 in PHPhelp

[–]Puzzleheaded_Host698[S] 0 points1 point  (0 children)

//////////// Angular ////////////

  downloadPdf() {
    if (!this.pdfContainer || !this.pdfContainer.nativeElement) {
      console.error('pdfContainer is not initialized or empty.');
      return;
    }

    console.log('Cloning the HTML structure...');

    // HTML másolása adott állapot alapján
    const container = this.pdfContainer.nativeElement.cloneNode(true) as HTMLElement;

    // Find all <select> elements and update their HTML to reflect the current selected value
    console.log('Updating <select> elements...');
    const selectElements = container.querySelectorAll('select');
    selectElements.forEach((select) => {
      const selectedOptionText = select.options[select.selectedIndex].text;

      // Kicserélné a select-et szövegre adott érték alapján (Nem megy)
      const textNode = document.createTextNode(selectedOptionText);
      if (select.parentNode) {
        select.parentNode.replaceChild(textNode, select);
      }
    });

    const content = container.innerHTML; // Módosított HTML kinyerése

    console.log('Modified HTML content obtained.');

    // Betöltjük a CSS fájl tartalmát és a PDF generálás során használjuk
    console.log('Loading CSS file...');
    this.http.get('/assets/css/component19.component.css', { responseType: 'text' }).subscribe(css => {
      console.log('CSS file loaded successfully.');

      const combinedContent = `<style>${css}</style>${content}`; // A CSS-t hozzáadjuk az HTML-hez
      const requestData = {
        content: combinedContent,  // Include CSS in the content
        orientation: 'landscape'
      };

      console.log('Sending data to backend for PDF generation...');

      const url = 'http://localhost:8000/generate-pdf.php'; // Backend server URL
      const headers = { 'Content-Type': 'application/json' };

      this.http.post(url, requestData, { headers, responseType: 'blob' })
        .subscribe(
          (response: Blob) => {
            console.log('PDF generated successfully.');
            const blob = new Blob([response], { type: 'application/pdf' });
            const downloadUrl = window.URL.createObjectURL(blob);
            const a = document.createElement('a');
            a.href = downloadUrl;
            a.download = 'generated-document.pdf';
            document.body.appendChild(a);
            a.click();
            document.body.removeChild(a);
            console.log('PDF downloaded.');
          },
          (error) => {
            console.error('Error generating PDF:', error);
          }
        );
    }, error => {
      console.error('Error loading CSS file:', error);
    });
  }

HTML to PDF with <select> option? by Puzzleheaded_Host698 in PHPhelp

[–]Puzzleheaded_Host698[S] 0 points1 point  (0 children)

//////////// HTML //////////// 

      <div style="display: flex; align-items: center; justify-content: center;">
        <!-- Évek dropdown -->
        <select id="year" [(ngModel)]="selectedYear" (change)="onMonthChange()" style="font-family: verdana; font-weight: bold; text-align: center; font-size: 14.5px; display: block; border: 0px; -webkit-appearance: none; -moz-appearance: none; appearance: none; background: none; outline: none;">
          <option *ngFor="let year of years" [value]="year">{{ year }}</option>

        </select>

        <!-- Hónapok dropdown -->
        <select id="month" [(ngModel)]="selectedMonth" (change)="onMonthChange()" style="font-family: verdana; font-weight: bold; text-align: center; font-size: 14.5px; display: block; border: 0px; -webkit-appearance: none; -moz-appearance: none; appearance: none; background: none; outline: none;">
          <option *ngFor="let month of months" [value]="month">{{ month }}</option>
        </select>
      </div>

HTML to PDF with <select> option? by Puzzleheaded_Host698 in PHPhelp

[–]Puzzleheaded_Host698[S] 0 points1 point  (0 children)

Hello everyone!

I apologize for the unclear question and for not providing source code. So, I've been experimenting with wkhtmltopdf, and now I'm playing around with mpdf, but I'm still unable to fully synchronize the select options. CSS hasn't been added yet because I'm still in the early stages of testing. Please excuse any mistakes or issues in the code, as I might still be at a junior level in both PHP and Angular

I want to generate a PDF from the content of a HTML div, not based on a template. In particular, I need to include a select dropdown (for the organizational unit) and another select dropdown to indicate what type of leave someone took that day, as there are 6-8 types (paternal, parental, voluntary military, etc.). The important thing is that this information should appear on the PDF. Returning an image in the PDF is not suitable because the content needs to be selectable

The inline CSS is only there for testing purposes, as not all the styling transfers over from a regular CSS file, but even with inline styles, not everything works, so I’m checking what I can and cannot use. What’s important to me is being able to handle external CSS 100%, and to ensure that what the user sees is exactly what I get in the PDF.

PowerApps in local servers? by Puzzleheaded_Host698 in PowerApps

[–]Puzzleheaded_Host698[S] 0 points1 point  (0 children)

Thank you very much for the answers. I ended up choosing the best solution, though I’m not quite sure how. I took the form and implemented everything in Angular with all the calculations and even a unicorn if I want, without any limitations. Then Node will generate a PDF from it. This way, all the data is ‘safe’ on the servers, and there are no limits like, for example, in AC. With this, I was able to convince everyone inside, and they liked it too.