Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correção de regras da tag <Price> quando não tem preço em USD ou BRL #149

Open
amandasramalho opened this issue Feb 27, 2023 · 1 comment

Comments

@amandasramalho
Copy link
Member

Quando não há valores em USD (normalmente por ser vendido somente no BR) o ONIX gera errado:

<Price>
          <PriceType>01</PriceType>
</Price>

Exemplos de SBID: 3kq8w e 9nk5n

Modelo de ONIX quando não há valor em USD:

<Price>
          <PriceType>01</PriceType>
          <PriceAmount>52.00</PriceAmount>
          <CurrencyCode>BRL</CurrencyCode>
          <Territory>
                    <RegionsIncluded>WORLD</RegionsIncluded>
          </Territory>
</Price>

Modelo de ONIX quando não há valores em BRL:

<Price>
          <PriceType>01</PriceType>
          <PriceAmount>10.00</PriceAmount>
          <CurrencyCode>USD</CurrencyCode>
          <Territory>
                    <RegionsIncluded>WORLD</RegionsIncluded>
          </Territory>
</Price>

Modelo de ONIX quando há BRL e USD:

<Price>
          <PriceType>01</PriceType>
          <PriceAmount>10.00</PriceAmount>
          <CurrencyCode>USD</CurrencyCode>
          <Territory>
                    <RegionsIncluded>WORLD</RegionsIncluded>
                    <CountriesExcluded>BR</CountriesExcluded>
          </Territory>
</Price>
<Price>
          <PriceType>01</PriceType>
          <PriceAmount>50.00</PriceAmount>
          <CurrencyCode>BRL</CurrencyCode>
          <Territory>
                    <RegionsIncluded>WORLD</RegionsIncluded>
                    <CountriesIncluded>BR</CountriesIncluded>
          </Territory>
</Price>

Modelo de ONIX quando BRL e USD são 0.00: (já está certo no ONIX, coloquei aqui apenas para confirmação):

<Price>
          <PriceType>01</PriceType>
          <PriceAmount>0.00</PriceAmount>
          <CurrencyCode>USD</CurrencyCode>
          <Territory>
                    <RegionsIncluded>WORLD</RegionsIncluded>
          </Territory>
</Price>
<Price>
          <PriceType>01</PriceType>
          <PriceAmount>0.00</PriceAmount>
          <CurrencyCode>BRL</CurrencyCode>
          <Territory>
                    <RegionsIncluded>WORLD</RegionsIncluded>
          </Territory>
</Price>
@amandasramalho
Copy link
Member Author

Para que eventuais erros de falta de preço no backoffice não passem desapercebidos, se possível, incluir no relatório de logs a relação de SBIDs que falta um dos preços.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant