- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
window.get_service_list = ->
services = (service.value for service in document.getElementById("id_services_to"))
services_old = (service.value for service in document.getElementById("id_services_from"))
service_list = services.concat services_old
return service_list
window.refresh_prices = (data) ->
result = 0
for service in document.getElementById("id_services_from")
temp = service.text.split(" ")
if isNaN temp[0] * 1 # Если цены еще нет
service.text = data[service.value] + ' ' + service.text
else
text = ''
text += word + ' ' for word in temp[1..temp.length]
service.text = data[service.value] + ' ' + text
for service in document.getElementById("id_services_to")
temp = service.text.split(" ")
if isNaN temp[0] * 1 # Если цены еще нет
service.text = data[service.value] + ' ' + service.text
else
text = ''
text += word + ' ' for word in temp[1..temp.length]
service.text = data[service.value] + ' ' + text
result += data[service.value]
discount = document.getElementById "id_discount"
document.getElementById("id_price").value = result * (100 - discount.value) / 100
Комментарии (0) RSS
Добавить комментарий