added print files uploader

This commit is contained in:
franknstayn
2020-03-07 21:35:12 +08:00
parent a958c158e4
commit 8685f93b29
7 changed files with 252 additions and 18 deletions

View File

@@ -432,19 +432,35 @@ class AdminModel extends Model
function selectCommission(){
$i = DB::select("SELECT t.StoreName, pd.InvoiceNumber, pd.CartKey, pd.Total, pd.SubTotal, pd.Tax, pd.Currency,
(pd.Total * 0.029) AS proc_fee,
(pd.SubTotal - 0.29) AS trans_rate, ROUND(((
SELECT trans_rate) - (
SELECT proc_fee)), 2) AS commission_rate, ROUND(((
SELECT commission_rate) * 0.25), 2) AS twenty_five_percent, ROUND(((
SELECT commission_rate) * 0.05), 2) AS five_percent
FROM orders AS o
INNER JOIN payment_details AS pd ON pd.CartKey = o.CartKey
INNER JOIN teamstores AS t ON o.StoreId = t.Id
GROUP BY pd.CartKey
ORDER BY o.DateCreated");
(pd.Total * 0.029) AS proc_fee,
(pd.SubTotal - 0.29) AS trans_rate, ROUND(((
SELECT trans_rate) - (
SELECT proc_fee)), 2) AS commission_rate, ROUND(((
SELECT commission_rate) * 0.25), 2) AS twenty_five_percent, ROUND(((
SELECT commission_rate) * 0.05), 2) AS five_percent
FROM orders AS o
INNER JOIN payment_details AS pd ON pd.CartKey = o.CartKey
INNER JOIN teamstores AS t ON o.StoreId = t.Id
GROUP BY pd.CartKey
ORDER BY o.DateCreated");
return $i;
}
function selectVisualizerPrint(){
$i = DB::select("SELECT t.TemplateCode, t.Thumbnail, t.TemplateName, t.IsActive,
s.SportsName, tc.Category
FROM templates AS t
LEFT JOIN sports AS s ON t.SportsId = s.Id
LEFT JOIN template_categories AS tc ON tc.Id = t.Category");
return $i;
}
function insertPrintFiles($data){
$i = DB::table('print_pattern_list')->insert($data);
return $i;
}
}