GayaBaru
Share
Explore

functions

f_filter_by_product_name

t_master_inventoryテーブルより、選択されたプロダクト名が該当するレコードを抽出。
Filter rows in inventory table by selected product name. Selected product is:
OXONE JUMBO RICE COOKER OX189 - 5,4L
@1
@2
@3
@4
@5
@6
@7
@8
@9
@10
@11
@12
@13
@14
@15
@16
@17
@18

f_distinct_sku_name

の結果、つまり選択されたプロダクトとリレーション関係にあるskuを抽出。
Get sku name for filtered rows. Results are distinct.
[p1-1][p1-2][p1-3]

f_rental_available_by_sku

の結果のskuのそれぞれがレンタル可能かどうかを出力。
処理内容
以下を の結果の各行、つまり各SKUに対して実行。
t_master_inventoryのsku_nameが該当のsku_nameであるものを取得。
このうち、t_master_inventoryのavailabilityが、trueであるものを取得。
このうち、日付がProduct Rentalページの予約開始日付(rental start date)以上予約終了日付(rental end date)+ 以内のレコードを取得。
上の結果の日数と、予約終了日付-予約開始日付+1+予備日が一致するかどうかを判断、言い換えると、予約希望期間中全てレンタル可能かどうかを確認する。確認後、一致するならtrue,そうでないならfalseを返す。
Flag if each sku is rentable. It outputs
true: the number of days available for the rental in the selected period is the same as the one in the selected period. In other words, “True” means to be available for the rental.
false: Any other cases.
This result is used when product is rentable or not. If there are at least more than 1 true, then “rentable” is displayed in the “Product Rental Page”.
falsetruefalse

f_available_dates_by_sku

各SKUのうち、レンタル希望期間中常にレンタル可能なSKUレコードを出力。
処理内容
以下を の結果の各行、つまり各SKUに対して実行。
t_master_inventoryのsku_nameが該当のsku_nameであるものを取得。
このうち、t_master_inventoryのavailabilityが、trueであるものを取得。
このうち、日付がProduct Rentalページの予約開始日付(rental start date)以上予約終了日付(rental end date)+ 以内のレコードを取得。
Get available id in the selected period, i.e., start_date and end_date by each sku.
[
@1
@3
@4
@5
@6
]
[
@7
@8
@9
@10
@11
@12
]
[
@16
@17
]

f_available_sku_row

の結果のうち、該当期間中常にレンタル可能であるSKUのうち、最初のレコードを取得。
Provided the available dates by sku in , this function filter the one of the rentable sku rows. This function filters rows only if the number of days available for the rental in the selected period is the same as the one in the selected period.
@7

f_available_sku

の出力結果レコードのsku nameを取得。本結果はskuとしてProduct Rentalページにて表示。
Provided the one of the rentable sku rows by , this function simply displays the corresponding sku name.
p1-2
f_flag_rental_available
の結果取得した各SKUのレンタル可/不可ステータスのうち、レンタル可能なSKUの数を出力。Product Rentalページではこちらが1以上かどうかを判断し、1以上であれば”レンタル可能”としてProduct Rentalページに表示。
Provided rental availability of each sku in , this function outputs the nubmer of available sku units.
1

insert_t_trans_reservation
update_t_master_inventory


Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.