mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-12 13:46:51 +00:00
create taxes only ofr booking platform
This commit is contained in:
parent
42764ab6cc
commit
472985351a
2 changed files with 5 additions and 2 deletions
|
|
@ -58,14 +58,17 @@ func NewHost() *Host {
|
|||
HasEndDate: true,
|
||||
Taxes: 1.5,
|
||||
},
|
||||
|
||||
"Airport": {
|
||||
Name: "Airport",
|
||||
Price: 25.0,
|
||||
},
|
||||
|
||||
"Port": {
|
||||
Name: "Port",
|
||||
Price: 20.0,
|
||||
},
|
||||
|
||||
"Transport": {
|
||||
Name: "Transport",
|
||||
Price: 20.0,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/rjNemo/rentease/internal/config"
|
||||
)
|
||||
|
||||
func (bs Service) CreateItem(bookingId int, item config.HostItem, quantity int, price float64, paymentMethod string, customerNumber int) (items []*Item) {
|
||||
func (bs Service) CreateItem(bookingId int, item config.HostItem, quantity int, price float64, paymentMethod string, customerNumber int, platform string) (items []*Item) {
|
||||
i := &Item{
|
||||
BookingId: bookingId,
|
||||
Item: item.Name,
|
||||
|
|
@ -19,7 +19,7 @@ func (bs Service) CreateItem(bookingId int, item config.HostItem, quantity int,
|
|||
}
|
||||
items = append(items, i)
|
||||
|
||||
if item.Taxes != 0.0 {
|
||||
if item.Taxes != 0.0 && platform == "Booking" {
|
||||
ti := &Item{
|
||||
BookingId: bookingId,
|
||||
Item: "Taxes",
|
||||
|
|
|
|||
Loading…
Reference in a new issue