mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
basic avoir invoice for wallet credit
This commit is contained in:
parent
b44089a33d
commit
9190e61f5f
@ -37,11 +37,13 @@ module PDF
|
|||||||
if Setting.find_by({name: 'invoice_code-active'}).value == 'true'
|
if Setting.find_by({name: 'invoice_code-active'}).value == 'true'
|
||||||
text I18n.t('invoices.code', CODE:Setting.find_by({name: 'invoice_code-value'}).value), :leading => 3
|
text I18n.t('invoices.code', CODE:Setting.find_by({name: 'invoice_code-value'}).value), :leading => 3
|
||||||
end
|
end
|
||||||
|
if invoice.invoiced_type != WalletTransaction.name
|
||||||
if invoice.is_a?(Avoir)
|
if invoice.is_a?(Avoir)
|
||||||
text I18n.t('invoices.order_number', NUMBER:invoice.invoice.order_number), :leading => 3
|
text I18n.t('invoices.order_number', NUMBER:invoice.invoice.order_number), :leading => 3
|
||||||
else
|
else
|
||||||
text I18n.t('invoices.order_number', NUMBER:invoice.order_number), :leading => 3
|
text I18n.t('invoices.order_number', NUMBER:invoice.order_number), :leading => 3
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if invoice.is_a?(Avoir)
|
if invoice.is_a?(Avoir)
|
||||||
text I18n.t('invoices.refund_invoice_issued_on_DATE', DATE:I18n.l(invoice.avoir_date.to_date))
|
text I18n.t('invoices.refund_invoice_issued_on_DATE', DATE:I18n.l(invoice.avoir_date.to_date))
|
||||||
else
|
else
|
||||||
@ -68,7 +70,11 @@ module PDF
|
|||||||
# object
|
# object
|
||||||
move_down 25
|
move_down 25
|
||||||
if invoice.is_a?(Avoir)
|
if invoice.is_a?(Avoir)
|
||||||
|
if invoice.invoiced_type == WalletTransaction.name
|
||||||
|
object = I18n.t('invoices.wallet_credit')
|
||||||
|
else
|
||||||
object = I18n.t('invoices.cancellation_of_invoice_REF', REF: invoice.invoice.reference)
|
object = I18n.t('invoices.cancellation_of_invoice_REF', REF: invoice.invoice.reference)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
case invoice.invoiced_type
|
case invoice.invoiced_type
|
||||||
when 'Reservation'
|
when 'Reservation'
|
||||||
|
@ -68,6 +68,7 @@ en:
|
|||||||
order_number: "Order #: %{NUMBER}"
|
order_number: "Order #: %{NUMBER}"
|
||||||
invoice_issued_on_DATE: "Invoice issued on %{DATE}"
|
invoice_issued_on_DATE: "Invoice issued on %{DATE}"
|
||||||
refund_invoice_issued_on_DATE: "Refund invoice issued on %{DATE}"
|
refund_invoice_issued_on_DATE: "Refund invoice issued on %{DATE}"
|
||||||
|
wallet_credit: "Wallet credit"
|
||||||
cancellation_of_invoice_REF: "Cancellation of invoice %{REF}"
|
cancellation_of_invoice_REF: "Cancellation of invoice %{REF}"
|
||||||
reservation_of_USER_on_DATE_at_TIME: "Reservation of %{USER} on %{DATE} at %{TIME}"
|
reservation_of_USER_on_DATE_at_TIME: "Reservation of %{USER} on %{DATE} at %{TIME}"
|
||||||
cancellation: "Cancellation"
|
cancellation: "Cancellation"
|
||||||
|
@ -68,6 +68,7 @@ fr:
|
|||||||
order_number: "N° Commande : %{NUMBER}"
|
order_number: "N° Commande : %{NUMBER}"
|
||||||
invoice_issued_on_DATE: "Facture éditée le %{DATE}"
|
invoice_issued_on_DATE: "Facture éditée le %{DATE}"
|
||||||
refund_invoice_issued_on_DATE: "Avoir édité le %{DATE}"
|
refund_invoice_issued_on_DATE: "Avoir édité le %{DATE}"
|
||||||
|
wallet_credit: "Crédit du porte-monnaie"
|
||||||
cancellation_of_invoice_REF: "Annulation de la facture %{REF}"
|
cancellation_of_invoice_REF: "Annulation de la facture %{REF}"
|
||||||
reservation_of_USER_on_DATE_at_TIME: "Réservation de %{USER} le %{DATE} à %{TIME}"
|
reservation_of_USER_on_DATE_at_TIME: "Réservation de %{USER} le %{DATE} à %{TIME}"
|
||||||
cancellation: "Annulation"
|
cancellation: "Annulation"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user