Skip to content

Commit

Permalink
Add pub_price from Zur Rose
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Dec 2, 2013
1 parent 7b32f36 commit 8893be2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/oddb2xml/builder.rb
Expand Up @@ -671,6 +671,11 @@ def build_article
xml.PTYP "ZURROSE"
xml.PRICE price[:price]
}
xml.ARTPRI {
xml.VDAT Time.parse(datetime).strftime("%d.%m.%Y")
xml.PTYP "ZURROSEPUB"
xml.PRICE price[:pub_price]
}
end
#xml.ARTMIG {
#xml.VDAT
Expand Down
3 changes: 2 additions & 1 deletion lib/oddb2xml/extractor.rb
Expand Up @@ -418,7 +418,8 @@ def to_hash
next unless line =~ /(7680\d{9})(\d{1})\r\n$/
data[$1.to_s] = {
:vat => $2.to_s,
:price => sprintf("%.2f", line[60,6].gsub(/(\d{2})$/, '.\1').to_f)
:price => sprintf("%.2f", line[60,6].gsub(/(\d{2})$/, '.\1').to_f),
:pub_price => sprintf("%.2f", line[66,6].gsub(/(\d{2})$/, '.\1').to_f),
}
end if @io
data
Expand Down

0 comments on commit 8893be2

Please sign in to comment.