Skocz do zawartości

[TUTORIAL] TRANSFORMATA / Eksport SELLO > EN dla Kurier48 Polecony Firmowy

Polecane posty

W załączniku transformata pozwalająca wyeksportować z Sello paczki do EN. Dotyczy przesyłek:

 

✓ kurier 48

✓ kurier 48 pobranie

✓ kurier 48 odbiór w punkcie

✓ kurier 48 pobranie odbiór w punkcie

✓ przesyłka firmowa polecona

✓ przesyłka firmowa polecona priorytet

 

W kodzie należy podmienić następujące wpisy:

 

✓ Pocztex Kurier48

✓ Pocztex Kurier48 pobraniowy

✓ Pocztex Kurier48 - odbiór w punkcie

✓ Pocztex Kurier48 pobraniowy - odbiór w punkcie

✓ XXXXXXXXX

✓ Przesyłka Firmowa Polecona

✓ (s:DeliveryAddress/s:ZipCode, '41-20') or starts-with(s:DeliveryAddress/s:ZipCode, '41-21')

✓ Przesyłka Firmowa Polecona Priorytetowa

 

wg swoich nazw przesyłek w Sello, XXXXXXXXX to nr komórki nadawcy, a kody (41-20 i 41-21 to zakres kodów dla przesyłek miejscowych wg lokalizacji nadawcy)

 

Zmodyfikowany kod wklejamy w Sello: USTAWIENIA > SŁOWNIKI > EKSPORT DANYCH > DODAJ :

nazwa - wg uznania

moduł - paczki

transformata - zmodyfikowany kod

plik wynikowy - miejsce, gdzie będzie się zapisywał plik do EN np. EN.xml

 

Najlepiej jest, gdy mamy z Poczty swoją pulę numerów, którą dodajemy do Sello - wtedy w EN są nasze nr, a w Sello od razu mamy je wpisane do paczki.

 

Eksport z listy paczek CTRL+T, ptaszek na nazwie transformaty EN, potem logowanie do EN i import pliku wynikowego .xml oraz druk etykiet.

 

Nr PNI urzędu odbiorczego (lub żabki, orlenki itp.) wpisujemy w Sello w transakcji w polu NIP dla adresu wysyłki, szukamy go tu:

http://odbiorwpunkcie.poczta-polska.pl/

lub dla UP mamy zawsze aktualny tutaj:

http://odbiorwpunkcie.poczta-polska.pl/pliki.php?t=xmlK48S

(do rozpakowania na komputerze)

 

Mam nadzieję, że nie zrobiłem gdzieś błędu...

 

TRANSFORMATA_EN.zip

Edytowane przez MARCIN e-kupowanie_pl
Ponowne dodanie załącznika | 19 III 2018
Link to postu

Numer PNI dało by się odszukać automatycznie. Jest to plik xml więc można go przetworzyć za pomocą transformaty i wyszukać numer PNI wyrażeniem XPath (coś w stylu dane/r[kod=kod_pocztowy] ).

 

https://stackoverflow.com/questions/16812192/extract-data-from-external-xml-file-using-xsl.

 

Ewentualnie, w transformacie można używać Java Scriptu, więc można wczytać cały dokument xml i wyszukać PNI. Niestety nie mam teraz możliwości zgłębić temat, ale może ktoś z transformatopisarzy będzie mógł z tej podpowiedzi zrobić użytek).

 

 

Link to postu

Numer PNI dało by się odszukać automatycznie. Jest to plik xml więc można go przetworzyć za pomocą transformaty i wyszukać numer PNI wyrażeniem XPath (coś w stylu dane/r[kod=kod_pocztowy] ).

 

https://stackoverflow.com/questions/16812192/extract-data-from-external-xml-file-using-xsl.

 

Ewentualnie, w transformacie można używać Java Scriptu, więc można wczytać cały dokument xml i wyszukać PNI. Niestety nie mam teraz możliwości zgłębić temat, ale może ktoś z transformatopisarzy będzie mógł z tej podpowiedzi zrobić użytek).

 

 

 

Utrudnieniem będzie to, że np. dla "FUP Kraków 11" są 4 wyniki a 3 mają ten sam kod pocztowy... Różnią się ulicami...

 

Line 1366: <r pni="357035" y="50.016990" x="19.898005" wojewodztwo="MAŁOPOLSKIE" powiat="Kraków" gmina="Kraków" nazwa="FUP Kraków 11" kod="30-309" miejscowosc="Kraków" ulica="ul. Chmieleniec 39" telefon="12 263 96 80 #jedn. nadrzędna: UP Kraków 11#tel.: 885 900 379" opis="dni robocze: Pon.: 10:00-19:30 Wt.: 10:00-19:30 Śr.: 10:00-19:30 Czw.: 10:00-19:30 Pt.: 10:30-20:00#soboty: placówka nieczynna#niedziele i święta: placówka nieczynna#Placówka dostosowana do potrzeb osób niepełnosprawnych.#" stan=""/>
Line 1368: <r pni="308557" y="50.016661" x="19.808266" wojewodztwo="MAŁOPOLSKIE" powiat="Kraków" gmina="Kraków" nazwa="FUP Kraków 11" kod="30-309" miejscowosc="Kraków" ulica="ul. Benedyktyńska 10" telefon="12-267-56-62 #jedn. nadrzędna: UP Kraków 11#tel.: 885 900 379" opis="dni robocze: Pon.: 08:00-14:30 Wt.: 08:00-14:30 Śr.: 08:00-14:30 Czw.: 11:00-17:30 Pt.: 13:30-20:00#soboty: placówka nieczynna#niedziele i święta: placówka nieczynna#Placówka dostosowana do potrzeb osób niepełnosprawnych.#" stan=""/>
Line 1369: <r pni="547073" y="49.998852" x="19.895782" wojewodztwo="MAŁOPOLSKIE" powiat="Kraków" gmina="Kraków" nazwa="FUP Kraków 11" kod="30-309" miejscowosc="Kraków" ulica="ul. Profesora Wojciecha Marii Bartla 22 lok. 1" telefon="12-262-33-17 #jedn. nadrzędna: UP Kraków 11#tel.: 885 900 379" opis="dni robocze: Pon.: 09:00-19:00 Wt.: 09:00-19:00 Śr.: 09:00-19:00 Czw.: 09:00-19:00 Pt.: 10:00-20:00#soboty: placówka nieczynna#niedziele i święta: placówka nieczynna#Placówka dostosowana do potrzeb osób niepełnosprawnych.#" stan=""/>
Line 1370: <r pni="970591" y="50.045905" x="19.931309" wojewodztwo="MAŁOPOLSKIE" powiat="Kraków" gmina="Kraków" nazwa="FUP Kraków 11" kod="30-300" miejscowosc="Kraków" ulica="ul. Wierzbowa 4" telefon="12-266-20-63 #jedn. nadrzędna: UP Kraków 11#tel.: 885 900 379" opis="dni robocze: 08:00-20:00#soboty: placówka nieczynna#niedziele i święta: placówka nieczynna#Placówka dostosowana do potrzeb osób niepełnosprawnych.#" stan=""/>

Link to postu
Dnia 6.03.2018 o 14:39, Bartosz Rosa napisał:

Numer PNI dało by się odszukać automatycznie. Jest to plik xml więc można go przetworzyć za pomocą transformaty i wyszukać numer PNI wyrażeniem XPath (coś w stylu dane/r[kod=kod_pocztowy] ).

 

https://stackoverflow.com/questions/16812192/extract-data-from-external-xml-file-using-xsl.

 

Ewentualnie, w transformacie można używać Java Scriptu, więc można wczytać cały dokument xml i wyszukać PNI. Niestety nie mam teraz możliwości zgłębić temat, ale może ktoś z transformatopisarzy będzie mógł z tej podpowiedzi zrobić użytek).

 

 

A czy jest szansa, że ten numer PNI Sello 'wydłubie' z allegro i przekaże do Subiekta ?

Link to postu
  • 4 tygodnie później...
  • 7 miesięcy temu...
Dnia 13.03.2018 o 11:47, MARCIN e-kupowanie.pl napisał:

Nie ma, bo Allegro przez API nie zwraca nr PNI, w tym cały ambaras...

Minęło kilka miesięcy, czy może allegro nawróciło się i udostępnia już PNI przez API,

ktoś może ma jakieś przecieki w tym temacie ?

Link to postu

Tak, zwracają już ten numer. Chcieliśmy to dorobić do najbliższej aktualizacji, ale już musimy zamknąć wersję pod względem nowych poprawek, bo jest testowana, a zmiany są dosyć istotne i wymagają dużo więcej testów niż przeciętne wersje. Myślę jednak, że w kolejnej aktualizacji numer ten mógłby się pojawić.

Link to postu
31 minut temu, Bartosz Rosa napisał:

Tak, zwracają już ten numer. Chcieliśmy to dorobić do najbliższej aktualizacji, ale już musimy zamknąć wersję pod względem nowych poprawek, bo jest testowana, a zmiany są dosyć istotne i wymagają dużo więcej testów niż przeciętne wersje. Myślę jednak, że w kolejnej aktualizacji numer ten mógłby się pojawić.

Rozumiem, że temat dodania tej funkcji do najbliższej aktualizacji jest zamknięty,

nie wiem na ile - to jest istotne innym użytkownikom Sello,

dla mnie brak tego przenoszenia PNI - to jest dodatkowych kilkanaście godzin pracy miesięcznie, co rocznie robi kilkadziesiąt, a to już wymierne pieniądze.

Link to postu
  • 3 miesiące temu...
Dnia 21.11.2018 o 08:50, Bartosz Rosa napisał:

Myślę jednak, że w kolejnej aktualizacji numer ten mógłby się pojawić.

@Bartosz Rosa gdzie w bazie Sello znajdę PNI? pojawia się już? chyba dość pilne w obliczu tego, że Sello nie będzie miało integracji z API EN do allegro...

Link to postu

Sporo. Chcemy w niej wypuścić pierwszą część integracji z nowym API Allegro - a to jest bardzo dużo roboty, bo przy okazji wprowadzamy też nowe rozwiązania w zakresie kolejkowania zadań przez wątki synchronizujące w tle. Wersja 1.31 zatem na pewno się przeciągnie, ale ile, to jeszcze nie jestem w stanie powiedzieć.

Link to postu
  • 8 miesięcy temu...

Od jakiegoś czasu mam problem z transformatą. Po eksporcie przesyłek otrzymuję komunikat GUID przesyłki nie jest unikalny..

Problem ten ma miejsce zawsze gdy dodaję przesyłkę klienta, który już kiedyś coś zamawiał. Ostatnio z kolei do każdej przesyłki mam taki komunikat.

Co jest przyczyną i jak to naprawić?

 

Przesyłam transformatę:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s="http://www.sello.pl/export">
  <!--Przesyłka polecona-->
  <!--Informuje o tym, czy jest przesyłką „firmową”:
  T – tak
  N – nie-->
  <xsl:variable name="Firmowa">N</xsl:variable>
  <!--Informuje o tym, czy jest przesyłką „miejscową”:
  T – tak
  N – nie-->
  <xsl:variable name="Miejscowa"></xsl:variable>
  <!--Informuje o tym, czy jest przesyłką „ubezpieczoną”:
  T – tak
  N – nie-->
  <xsl:variable name="Ubezpieczona">N</xsl:variable>
  <!--Oznaczenie umowy na podstawie, której nadawane są przesyłki pocztowe (idUmowyMRUMC).-->
  <xsl:variable name="NrUmowy">164835</xsl:variable>
  <!--Oznaczenie Karty na podstawie, której nadawane są przesyłki pocztowe (idKartyMRUMR).-->
  <xsl:variable name="KartaUmowy">247775</xsl:variable>
  <!--Dotyczy gabarytu przesyłki:
 S – gabaryt S
M – gabaryt M
L – gabaryt L-->
  <xsl:variable name="Gabaryt">S</xsl:variable>
  <!--Sposób powiadomienia adresata przesyłki. Jeśli pole jest puste, to powiadomienie nie jest wysyłane.
  M – SMS
  E – E-mail-->
  <xsl:variable name="FormaPowiadomieniaAdresata"></xsl:variable>
  <!--Opis dla danej paczki. Pole z dowolną zawartością nie przekraczającą długości 40 znaków-->
  <xsl:template name="Opis">Paczka nr <xsl:value-of select="s:Symbol"/></xsl:template>
  <!--Dodaje dodatkowa linie Autoit z symbolem oraz z iloscia zakupionych przedmiotow w celu wyliczenia wagi-->
  <xsl:template name="Przedmioty">
     <xsl:for-each select="s:Items/s:Item"><xsl:value-of select="s:Symbol"/>:<xsl:value-of select="s:Quantity"/>,</xsl:for-each>
  </xsl:template>

  <xsl:param name="Year"/>
  <xsl:param name="Month"/>
  <xsl:param name="Day"/>
  <xsl:param name="Hour"/>
  <xsl:param name="Minute"/>
  <xsl:param name="Second"/>
  <xsl:template match="s:ExportData">
    <xsl:element name="Nadawca">
      <xsl:attribute name="Struktura">1.6</xsl:attribute>
      <xsl:attribute name="Nazwa">
        <xsl:value-of select="s:Company/s:Address/s:Company"/>
      </xsl:attribute>
      <xsl:attribute name="NazwaSkrocona">
        <xsl:variable name="companyName" select="s:Company/s:Address/s:Company"/>
        <xsl:value-of select="substring($companyName,0,10)"/>
      </xsl:attribute>
      <xsl:attribute name="Ulica">
        <xsl:value-of select="s:Company/s:Address/s:Street"/>
      </xsl:attribute>
      <xsl:attribute name="Dom">
        <xsl:value-of select="s:Company/s:Address/s:HouseNumber"/>
      </xsl:attribute>
      <xsl:attribute name="Lokal">
        <xsl:value-of select="s:Company/s:Address/s:FlatNumber"/>
      </xsl:attribute>
      <xsl:attribute name="Miejscowosc">
        <xsl:value-of select="s:Company/s:Address/s:City"/>
      </xsl:attribute>
      <xsl:attribute name="Kod">
        <xsl:value-of select="translate(s:Company/s:Address/s:ZipCode,'- ','')"/>
      </xsl:attribute>
      <xsl:attribute name="NIP">
        <xsl:value-of select="translate(s:Company/s:Address/s:NIP,'- ','')"/>
      </xsl:attribute>
      <xsl:attribute name="Zrodlo">NADAWCA</xsl:attribute>
      <xsl:attribute name="Guid">
        <xsl:value-of select="s:Company/s:GUID"/>
      </xsl:attribute>
      <xsl:element name="Zbior">
        <xsl:attribute name="Nazwa">
          <xsl:value-of select="concat(format-number($Day,'00'),'-',format-number($Month,'00'),'-',$Year,'\1')"/>
        </xsl:attribute>
        <xsl:attribute name="DataUtworzenia">
          <xsl:value-of select="concat($Year,'-',format-number($Month,'00'),'-',format-number($Day,'00'),'T',format-number($Hour,'00'),':',format-number($Minute,'00'),':',format-number($Second,'00'))"/>
        </xsl:attribute>
        <xsl:attribute name="Opis">Jakis dowolny opis</xsl:attribute>
        <xsl:attribute name="IloscPrzesylek">
          <xsl:value-of select="count(s:Package)"/>
        </xsl:attribute>
        <xsl:attribute name="Guid">
          <xsl:value-of select="s:GUID"/>
        </xsl:attribute>
        <xsl:apply-templates select="s:Package"/>
      </xsl:element>
    </xsl:element>
  </xsl:template>
    <xsl:template match="s:Package">
  <xsl:if test="s:DeliveryMethod/s:DeliveryName='List ekonomiczny'">
    <xsl:element name="Przesylka">
      <xsl:attribute name="Guid">
        <xsl:value-of select="s:GUID"/>
      </xsl:attribute>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Nazwa</xsl:attribute>
        <xsl:choose>
          <xsl:when test="s:DeliveryAddress/s:Company!=''">
            <xsl:value-of select="s:DeliveryAddress/s:Company"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="s:DeliveryAddress/s:Name"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:element>
      <xsl:if test="s:DeliveryAddress/s:Company!='' and s:DeliveryAddress/s:Name!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ">Adresat</xsl:attribute>
          <xsl:attribute name="Nazwa">NazwaII</xsl:attribute>
          <xsl:value-of select="s:DeliveryAddress/s:Name"/>
        </xsl:element>
      </xsl:if>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Ulica</xsl:attribute>
        <xsl:value-of select="s:DeliveryAddress/s:Street"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Dom</xsl:attribute>
        <xsl:value-of select="s:DeliveryAddress/s:HouseNumber"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Lokal</xsl:attribute>
        <xsl:value-of select="s:DeliveryAddress/s:FlatNumber"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Miejscowosc</xsl:attribute>
        <xsl:value-of select="s:DeliveryAddress/s:City"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Kod</xsl:attribute>
        <xsl:value-of select="translate(s:DeliveryAddress/s:ZipCode,'- ','')"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Kraj</xsl:attribute>
        <xsl:choose>
          <xsl:when test="s:DeliveryAddress/s:Country=''">Polska</xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="s:DeliveryAddress/s:Country"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:element>
      <!--Atrybuty specyficzne dla przesyłki 840-->
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Symbol</xsl:attribute>840</xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Firmowa</xsl:attribute>
        <xsl:value-of select="$Firmowa"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Miejscowa</xsl:attribute>
        <xsl:value-of select="$Miejscowa"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Kategoria</xsl:attribute>E</xsl:element>
      <xsl:if test="$NrUmowy!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">Umowa</xsl:attribute>
          <xsl:value-of select="$NrUmowy"/>
        </xsl:element>
      </xsl:if>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">PosteRestante</xsl:attribute>
        <xsl:choose>
          <xsl:when test="s:DeliveryMethod/s:PosteRestante=1">T</xsl:when>
          <xsl:otherwise>N</xsl:otherwise>
        </xsl:choose>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Ilosc</xsl:attribute>1</xsl:element>
        <xsl:if test="s:Weight">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">Masa</xsl:attribute>
          <xsl:value-of select="round(number(s:Weight)*1000)"/>
        </xsl:element>
      </xsl:if>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">DlaOciemn</xsl:attribute>N</xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">EgzBibl</xsl:attribute>N</xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Strefa</xsl:attribute>A</xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Wersja</xsl:attribute>1</xsl:element>
      <xsl:variable name="description">
        <xsl:call-template name="Opis"/>
      </xsl:variable>
      <xsl:if test="$description!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">Uwagi</xsl:attribute>
          <xsl:value-of select="$description"/>
        </xsl:element>
      </xsl:if>
      <xsl:variable name="code">
        <xsl:call-template name="Przedmioty"/>
      </xsl:variable>
      <xsl:if test="$code!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">Autoit</xsl:attribute>
          <xsl:value-of select="$code"/>
        </xsl:element>
      </xsl:if>
    </xsl:element>
  </xsl:if>

  <xsl:if test="s:DeliveryMethod/s:DeliveryName='List priorytetowy'">
    <xsl:element name="Przesylka">
      <xsl:attribute name="Guid">
        <xsl:value-of select="s:GUID"/>
      </xsl:attribute>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Nazwa</xsl:attribute>
        <xsl:choose>
          <xsl:when test="s:DeliveryAddress/s:Company!=''">
            <xsl:value-of select="s:DeliveryAddress/s:Company"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="s:DeliveryAddress/s:Name"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:element>
      <xsl:if test="s:DeliveryAddress/s:Company!='' and s:DeliveryAddress/s:Name!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ">Adresat</xsl:attribute>
          <xsl:attribute name="Nazwa">NazwaII</xsl:attribute>
          <xsl:value-of select="s:DeliveryAddress/s:Name"/>
        </xsl:element>
      </xsl:if>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Ulica</xsl:attribute>
        <xsl:value-of select="s:DeliveryAddress/s:Street"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Dom</xsl:attribute>
        <xsl:value-of select="s:DeliveryAddress/s:HouseNumber"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Lokal</xsl:attribute>
        <xsl:value-of select="s:DeliveryAddress/s:FlatNumber"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Miejscowosc</xsl:attribute>
        <xsl:value-of select="s:DeliveryAddress/s:City"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Kod</xsl:attribute>
        <xsl:value-of select="translate(s:DeliveryAddress/s:ZipCode,'- ','')"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Kraj</xsl:attribute>
        <xsl:choose>
          <xsl:when test="s:DeliveryAddress/s:Country=''">Polska</xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="s:DeliveryAddress/s:Country"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:element>
      <!--Atrybuty specyficzne dla przesyłki 805-->
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Symbol</xsl:attribute>805</xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Firmowa</xsl:attribute>
        <xsl:value-of select="$Firmowa"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Miejscowa</xsl:attribute>
        <xsl:value-of select="$Miejscowa"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Kategoria</xsl:attribute>P</xsl:element>
      <xsl:if test="$NrUmowy!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">Umowa</xsl:attribute>
          <xsl:value-of select="$NrUmowy"/>
        </xsl:element>
      </xsl:if>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">PosteRestante</xsl:attribute>
        <xsl:choose>
          <xsl:when test="s:DeliveryMethod/s:PosteRestante=1">T</xsl:when>
          <xsl:otherwise>N</xsl:otherwise>
        </xsl:choose>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Ilosc</xsl:attribute>1</xsl:element>
        <xsl:if test="s:Weight">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">Masa</xsl:attribute>
          <xsl:value-of select="round(number(s:Weight)*1000)"/>
        </xsl:element>
      </xsl:if>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">DlaOciemn</xsl:attribute>N</xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">EgzBibl</xsl:attribute>N</xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Strefa</xsl:attribute>A</xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Wersja</xsl:attribute>1</xsl:element>
      <xsl:variable name="description">
        <xsl:call-template name="Opis"/>
      </xsl:variable>
      <xsl:if test="$description!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">Uwagi</xsl:attribute>
          <xsl:value-of select="$description"/>
        </xsl:element>
      </xsl:if>
      <xsl:variable name="code">
        <xsl:call-template name="Przedmioty"/>
      </xsl:variable>
      <xsl:if test="$code!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">Autoit</xsl:attribute>
          <xsl:value-of select="$code"/>
        </xsl:element>
      </xsl:if>
    </xsl:element>
  </xsl:if>

  <xsl:if test="s:DeliveryMethod/s:DeliveryName='Polecony ekonomiczny' or s:DeliveryMethod/s:DeliveryName='Polecony priorytetowy'">
    <xsl:element name="Przesylka">
      <xsl:attribute name="Guid">
        <xsl:value-of select="s:GUID"/>
      </xsl:attribute>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Nazwa</xsl:attribute>
        <xsl:choose>
          <xsl:when test="s:DeliveryAddress/s:Company!=''">
            <xsl:value-of select="s:DeliveryAddress/s:Company"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="s:DeliveryAddress/s:Name"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:element>
      <xsl:if test="s:DeliveryAddress/s:Company!='' and s:DeliveryAddress/s:Name!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ">Adresat</xsl:attribute>
          <xsl:attribute name="Nazwa">NazwaII</xsl:attribute>
          <xsl:value-of select="s:DeliveryAddress/s:Name"/>
        </xsl:element>
      </xsl:if>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Ulica</xsl:attribute>
        <xsl:value-of select="s:DeliveryAddress/s:Street"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Dom</xsl:attribute>
        <xsl:value-of select="s:DeliveryAddress/s:HouseNumber"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Lokal</xsl:attribute>
        <xsl:value-of select="s:DeliveryAddress/s:FlatNumber"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Miejscowosc</xsl:attribute>
        <xsl:value-of select="s:DeliveryAddress/s:City"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Kod</xsl:attribute>
        <xsl:value-of select="translate(s:DeliveryAddress/s:ZipCode,'- ','')"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ">Adresat</xsl:attribute>
        <xsl:attribute name="Nazwa">Kraj</xsl:attribute>
        <xsl:choose>
          <xsl:when test="s:DeliveryAddress/s:Country=''">Polska</xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="s:DeliveryAddress/s:Country"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:element>
      <xsl:if test="$FormaPowiadomieniaAdresata!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">FormaPowiadomieniaAdresata</xsl:attribute>
          <xsl:value-of select="$FormaPowiadomieniaAdresata"/>
        </xsl:element>
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">KontaktPowiadomieniaAdresata</xsl:attribute>
          <xsl:choose>
            <xsl:when test="$FormaPowiadomieniaAdresata='M'">
              <xsl:variable name="phone" select="translate(s:DeliveryAddress/s:PhoneNumber,'- ()/','')"/>
              <xsl:variable name="phone2" select="format-number(substring($phone,string-length($phone)-8,9),'000000000')"/>
              <xsl:value-of select="$phone2"/>
            </xsl:when>
            <xsl:when test="$FormaPowiadomieniaAdresata='E'">
              <xsl:value-of select="s:DeliveryAddress/s:Email"/>
            </xsl:when>
          </xsl:choose>
        </xsl:element>
      </xsl:if>
      <!--Atrybuty specyficzne dla przesyłki 807-->
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Symbol</xsl:attribute>807</xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Firmowa</xsl:attribute>
        <xsl:value-of select="$Firmowa"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Miejscowa</xsl:attribute>
        <xsl:value-of select="$Miejscowa"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Ubezpieczona</xsl:attribute>
        <xsl:value-of select="$Ubezpieczona"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Kategoria</xsl:attribute>
        <xsl:choose>
          <xsl:when test="s:DeliveryMethod/s:Priority=1">P</xsl:when>
          <xsl:otherwise>E</xsl:otherwise>
        </xsl:choose>
      </xsl:element>
      <xsl:if test="$NrUmowy!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">Umowa</xsl:attribute>
          <xsl:value-of select="$NrUmowy"/>
        </xsl:element>
      </xsl:if>
      <xsl:if test="$KartaUmowy!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">KartaUmowy</xsl:attribute>
          <xsl:value-of select="$KartaUmowy"/>
        </xsl:element>
      </xsl:if>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">PosteRestante</xsl:attribute>
        <xsl:choose>
          <xsl:when test="s:DeliveryMethod/s:PosteRestante=1">T</xsl:when>
          <xsl:otherwise>N</xsl:otherwise>
        </xsl:choose>
      </xsl:element>
      <xsl:if test="s:Weight">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">Masa</xsl:attribute>
          <xsl:value-of select="round(number(s:Weight)*1000)"/>
        </xsl:element>
      </xsl:if>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Ilosc</xsl:attribute>1</xsl:element>
      <xsl:if test="s:SendingNumber!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">NrNadania</xsl:attribute>
          <xsl:value-of select="translate(s:SendingNumber,'- ','')"/>
        </xsl:element>
      </xsl:if>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">DlaOciemn</xsl:attribute>N</xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">EgzBibl</xsl:attribute>N</xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Uslugi</xsl:attribute>R</xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Strefa</xsl:attribute>
        <xsl:value-of select="$Gabaryt"/>
      </xsl:element>
      <xsl:element name="Atrybut">
        <xsl:attribute name="Typ"/>
        <xsl:attribute name="Nazwa">Wersja</xsl:attribute>1</xsl:element>
      <xsl:variable name="description">
        <xsl:call-template name="Opis"/>
      </xsl:variable>
      <xsl:if test="$description!=''">
        <xsl:element name="Atrybut">
          <xsl:attribute name="Typ"/>
          <xsl:attribute name="Nazwa">Uwagi</xsl:attribute>
          <xsl:value-of select="$description"/>
        </xsl:element>
      </xsl:if>
    </xsl:element>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>

 

 

Link to postu

GUID przesyłki nie jest unikalny oznacza to, że numer nadania jest już w systemie EN i następuje dubel. Z racji tego, że EN nie pozwala usuwać zbiorów z paczkami lub samych paczek po wydrukowaniu etykiety, taki błąd może być.

Jeżeli w Sello mamy wpisane numery nadać, skąd bierze sobie Sello podczas tworzenia paczki, wyexportujemy to do EN, wydrukujemy etykietę i zdarzy się że np. klient zrezygnował z zakupu, lub zabrakło towaru na magazynie, to podczas usuwania paczki w Sello numer nadania wraca do puli, gdzie jest przypisywany do kolejnej tworzonej paczki lecz w EN ten numer już istnieje.

Aby przeskoczyć ten numer, należy utworzyć testową paczkę w Sello z tym numerem nadania, który nie jest unikalny i ją wysłać.

Link to postu

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.
Uwaga: Twój wpis zanim będzie widoczny, będzie wymagał zatwierdzenia moderatora.

Użytkownik forum
Odpowiedz...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

×
×
  • Dodaj nową pozycję...