Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MIS21_Final_Project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chanelle Lunod
MIS21_Final_Project
Commits
d1dbca7c
Commit
d1dbca7c
authored
Jul 19, 2018
by
Chanelle Lunod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parent
7e168abf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
index.html.erb
app/views/products/index.html.erb
+12
-11
No files found.
app/views/products/index.html.erb
View file @
d1dbca7c
...
@@ -41,7 +41,6 @@
...
@@ -41,7 +41,6 @@
<%
if
trans
.
quantity
==
nil
%>
<%
if
trans
.
quantity
==
nil
%>
<%
trans
.
quantity
==
0
%>
<%
trans
.
quantity
==
0
%>
<%
end
%>
<%
end
%>
<%
@supplies
+=
trans
.
quantity
%>
<%
@supplies
+=
trans
.
quantity
%>
<%
end
%>
<%
end
%>
<%
end
%>
<%
end
%>
...
@@ -50,16 +49,14 @@
...
@@ -50,16 +49,14 @@
<td>
<td>
<%
@orders
=
0
%>
<%
@orders
=
0
%>
<%
product
.
transactions
.
each
do
|
trans
|
%>
<%
product
.
transactions
.
each
do
|
trans
|
%>
<%
if
trans
.
mode
==
"ORDER"
%>
<%
if
trans
.
mode
==
"Order"
%>
<%
if
trans
.
quantity
==
nil
%>
<%
if
trans
.
quantity
==
nil
%>
<%
trans
action
.
quantity
==
0
%>
<%
trans
.
quantity
==
0
%>
<%
end
%>
<%
end
%>
<%
@orders
+=
trans
.
quantity
%>
<%
@orders
+=
trans
.
quantity
%>
<%
end
%>
<%
end
%>
<%
end
%>
<%
end
%>
<%=
"(
#{
@orders
.
abs
}
)"
%>
<%=
@orders
%>
</td>
</td>
<td>
<td>
<%
@total
=
0
%>
<%
@total
=
0
%>
...
@@ -113,7 +110,6 @@
...
@@ -113,7 +110,6 @@
<th>
Supply
</th>
<th>
Supply
</th>
<th>
Order
</th>
<th>
Order
</th>
<th>
Total
</th>
<th>
Total
</th>
<th>
Created At
</th>
<th
colspan=
"6"
></th>
<th
colspan=
"6"
></th>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -162,12 +158,17 @@
...
@@ -162,12 +158,17 @@
<%
end
%>
<%
end
%>
<%=
@total
%>
<%=
@total
%>
</td>
</td>
<td>
<%
if
product
.
status
==
"Active"
%>
<td>
<td>
<%=
link_to
"Add Supply"
,
new_product_supply_path
(
product
),
class:
"btn btn-primary"
%>
<%=
link_to
"Add Supply"
,
new_product_supply_path
(
product
),
class:
"btn btn-primary"
%>
</td>
</td>
<td>
<td>
<%=
link_to
"Add Order"
,
new_product_order_path
(
product
),
class:
"btn btn-primary"
%>
<%=
link_to
"Add Order"
,
new_product_order_path
(
product
),
class:
"btn btn-primary"
%>
</td>
</td>
<%
else
%>
<%
end
%>
</td>
</tr>
</tr>
<%
end
%>
<%
end
%>
</tbody>
</tbody>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment