U ovom članku naučit ćete kako učitati račune kao PDF datoteke u RetailForce Cloud koristeći fiskalnog klijenta (pri korištenju fiskalizacije) i dobiti poveznicu za vašeg kupca za preuzimanje / pristup računima.
Ova funkcionalnost je dostupna od verzije 1.2 klijenta i pruža odgovarajuću offline mogućnost za digitalni račun.
Napomena: Ako ne koristite fiskalizaciju, poziv se mora drugačije dizajnirati, molimo pročitajte članak Prijenos digitalnih računa putem fiskalnog klijenta.
Da biste koristili ovu funkciju, licenca za digitalni račun (cjeloviti proizvod) mora biti aktivirana u konfiguraciji za odgovarajućeg klijenta.
Pažnja: Da bi sistem mogao pročitati metapodatke iz fiskalnog dokumenta, fiskalni dokument se mora prenijeti na fiskalni klijent PRIJE pozivanja sljedećih metoda.
Upotreba putem FiscalClient/FiscalService
Prilikom korištenja FiscalClient-a, za prijenos digitalnih računa dostupne su sljedeće 2 metode:
Metoda korištenjem naziva datoteke
/// <summary>
/// Uploads digital receipt with digital receipt metadata.
/// </summary>
/// <param name="uniqueClientId">The client id of the client where the digital receipt should be uploaded.</param>
/// <param name="filename">The name of the file to be uploaded. The file must exist and must be readable.</param>
/// <param name="documentGuid">The document guid of the document to get the receipt meta data. Document must be transferred before to fiscalisation.</param>
/// <returns>A unique url to download the file for the customer.</returns>
/// <exception cref="ArgumentNullException">Thrown if parameter <paramref name="uniqueClientId"/> is set to <see cref="Guid.Empty"/>.</exception>
/// <exception cref="ArgumentNullException">Thrown if parameter <paramref name="filename"/> is null or <see cref="string.Empty"/>.</exception>
/// <exception cref="FileNotFoundException">Thrown if given filename is not found.</exception>
/// <exception cref="ArgumentNullException">Thrown if parameter <paramref name="documentGuid"/> is set to <see cref="Guid.Empty"/>.</exception>
/// <exception cref="UnauthorizedAccessException"><paramref name="filename" /> specified a directory.-or- The caller does not have the required permission. </exception>
/// <exception cref="IOException">An I/O error occurred while opening the file. </exception>
public string UploadDigitalReceipt(Guid uniqueClientId, string filename, Guid documentGuid)
Ova funkcija omogućava učitavanje digitalnog računa pomoću datoteke na tvrdom disku (naziv datoteke).
Parametri
- uniqueClientId: jedinstveni ID fiskalnog klijenta.
- filename: naziv datoteke (uključujući putanju) PDF datoteke koja se treba otpremiti.
- documentGuid: Guid fiskalnog dokumenta (Document.DocumentGuid)
Vraćena vrijednost: URL za prikaz.
Metoda streaminga
/// <summary>
/// Uploads digital receipt with digital receipt metadata.
/// </summary>
/// <param name="uniqueClientId">The client id of the client where the digital receipt should be uploaded.</param>
/// <param name="file">The stream of the file to be uploaded.</param>
/// <param name="documentGuid">The document guid of the document to get the receipt meta data. Document must be transferred before to fiscalisation.</param>
/// <returns>A unique url to download the file for the customer.</returns>
/// <remarks>You can only use documents from the actual day.</remarks>
/// <exception cref="ArgumentNullException">Thrown if parameter <paramref name="uniqueClientId"/> is set to <see cref="Guid.Empty"/>.</exception>
/// <exception cref="ArgumentNullException">Thrown if parameter <paramref name="file"/> is set to null.</exception>
/// <exception cref="ArgumentNullException">Thrown if parameter <paramref name="documentGuid"/> is set to <see cref="Guid.Empty"/>.</exception>
public string UploadDigitalReceipt(Guid uniqueClientId, Stream file, Guid documentGuid)
Pomoću ove funkcije možete otpremiti digitalni račun prenosom datoteke (ili datoteka).
Parametri
- uniqueClientId: jedinstveni Id fiskalnog klijenta.
- file: stream sadržaja PDF datoteke (stream mora biti na početku)
- documentGuid: Guid fiskalnog dokumenta (Document.DocumentGuid)
Vraćena vrijednost: URL za prikaz.
Upotreba putem nuget implementacije
Kada koristite direktnu implementaciju Fiskaclient-a (TrustedFiscalModule) putem Nugeta, dostupna je samo jedna metoda sa FileStream-om:
/// <summary>
/// Upload digital receipt (if proper license exists). Only in combination with fiscalisation.
/// </summary>
/// <param name="file">The file to upload.</param>
/// <param name="documentGuid">The document guid of the document to get the receipt meta data. Document must be transferred before to fiscalisation.</param>
/// <returns>An url to request the file in the cloud.</returns>
/// <remarks>You can only use documents from the actual day.</remarks>
/// <exception cref="ArgumentNullException">Thrown if parameter <paramref name="file"/> is set to null.</exception>
/// <exception cref="ArgumentNullException">Thrown if parameter <paramref name="documentGuid"/> is set to <see cref="Guid.Empty"/>.</exception>
/// <exception cref="KeyNotFoundException">Thrown if the given documentGuid does not found a document in the document store.</exception>
public string UploadDigitalReceipt(Stream file, Guid documentGuid)
Pomoću ove funkcije možete otpremiti digitalni račun prenosom stream-a datoteke (ili više stream-ova).
Parametri
- file: stream sadržaja PDF datoteke (stream mora biti na početku)
- documentGuid: Guid fiskalnog dokumenta (Document.DocumentGuid)
Vraćena vrijednost: URL za prikaz.
Ovaj članak je automatski preveden.
Comments
0 comments
Please sign in to leave a comment.