Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. customer.each {
  2. |addr| if customer.pj = 'P'; addr.create (
  3. addr_type => 0
  4. addr_country => customer.r_oskm
  5. addr_post_index => customer.r_postal_code
  6. addr_reg_code => customer.r_region_number
  7. addr_reg_name => customer.r_region
  8. addr_area => customer.r_area
  9. addr_area_type => customer.r_area_type
  10. addr_city => customer.r_city
  11. addr_city_type => customer.r_city_type
  12. addr_house => customer.r_house
  13. if customer.r_block_type = "к"
  14. addr_block => customer.r_block
  15. #addr_str
  16. eslif customer.r_block_type = "стр"
  17. addr_str => customer.r_block
  18. #addr_block
  19. addr_apartment => customer.r_flat
  20. addr_local_name => customer.r_settlment
  21. addr_local_type => customer.r_settlement_type_full
  22. #addr_plan
  23. #addr_plan_type
  24. #addr_infr
  25. #addr_infr_type
  26. #addr_house
  27. #addr_porch
  28. #addr_office
  29. #addr_code
  30. #addr_addr_str
  31. #addr_address_lat
  32. )
  33. addr.create (
  34. addr_type => 1
  35. addr_country => customer.l_oskm
  36. addr_post_index => customer.l_postal_code
  37. addr_reg_code => customer.l_region_number
  38. addr_reg_name => customer.l_region
  39. addr_area => customer.l_area
  40. addr_area_type => customer.l_area_type
  41. addr_city => customer.l_city
  42. addr_city_type => customer.l_city_type
  43. addr_house => customer.l_house
  44. if customer.r_block_type = "к"
  45. addr_block => customer.r_block
  46. #addr_str
  47. eslif customer.r_block_type = "стр"
  48. addr_str => customer.r_block
  49. #addr_block
  50. addr_apartment => customer.l_flat
  51. addr_local_name => customer.l_settlment
  52. addr_local_type => customer.l_settlement_type_full
  53. #addr_plan
  54. #addr_plan_type
  55. #addr_infr
  56. #addr_infr_type
  57. #addr_house
  58. #addr_porch
  59. #addr_office
  60. #addr_code
  61. #addr_addr_str
  62. #addr_address_lat
  63. )
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement