Update app.py
Browse files
app.py
CHANGED
|
@@ -237,9 +237,9 @@ def pull_data_from_salesforce(data_type):
|
|
| 237 |
)
|
| 238 |
|
| 239 |
if data_type == "Inventory":
|
| 240 |
-
query = "SELECT Productname__c, Current_Stocks__c, soldstock__c FROM Inventory_Management__c LIMIT 100"
|
| 241 |
else:
|
| 242 |
-
query = "SELECT Productname__c, Current_Stock__c, soldstock__c FROM Un_Billable__c LIMIT 100"
|
| 243 |
|
| 244 |
response = sf.query_all(query)
|
| 245 |
records = response.get("records", [])
|
|
@@ -253,6 +253,9 @@ def pull_data_from_salesforce(data_type):
|
|
| 253 |
# Rename columns for better readability
|
| 254 |
df.rename(columns={
|
| 255 |
"Productname__c": "Product Name",
|
|
|
|
|
|
|
|
|
|
| 256 |
"Current_Stocks__c": "Current Stocks",
|
| 257 |
"Current_Stock__c": "Current Stocks",
|
| 258 |
"soldstock__c": "Sold Stock"
|
|
|
|
| 237 |
)
|
| 238 |
|
| 239 |
if data_type == "Inventory":
|
| 240 |
+
query = "SELECT Productname__c,Model__c, H_p__c, Stage__c, Current_Stocks__c, soldstock__c FROM Inventory_Management__c LIMIT 100"
|
| 241 |
else:
|
| 242 |
+
query = "SELECT Productname__c, Model__c, H_p__c, Stage__c, Current_Stock__c, soldstock__c FROM Un_Billable__c LIMIT 100"
|
| 243 |
|
| 244 |
response = sf.query_all(query)
|
| 245 |
records = response.get("records", [])
|
|
|
|
| 253 |
# Rename columns for better readability
|
| 254 |
df.rename(columns={
|
| 255 |
"Productname__c": "Product Name",
|
| 256 |
+
"Model__c": "Model",
|
| 257 |
+
"H_p__c": "H.P",
|
| 258 |
+
"Stage__c": "Stage",
|
| 259 |
"Current_Stocks__c": "Current Stocks",
|
| 260 |
"Current_Stock__c": "Current Stocks",
|
| 261 |
"soldstock__c": "Sold Stock"
|