Spaces:
Runtime error
Runtime error
File size: 5,331 Bytes
cdc3b32 6aba55b 245c573 6aba55b 245c573 6aba55b cdc3b32 6aba55b cdc3b32 6aba55b cdc3b32 6aba55b cdc3b32 6aba55b cdc3b32 6aba55b cdc3b32 6aba55b cdc3b32 6aba55b cdc3b32 6aba55b cdc3b32 6aba55b 0186fe5 6aba55b 0186fe5 6aba55b 0186fe5 6aba55b 0186fe5 6aba55b 0186fe5 6aba55b 245c573 6aba55b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | import streamlit as st
# Set page config MUST be first Streamlit command
st.set_page_config(
page_title="Business Knowledge Base",
page_icon="π",
layout="wide",
initial_sidebar_state="expanded"
)
# Initialize session state for knowledge base
if 'knowledge_base' not in st.session_state:
st.session_state.knowledge_base = {
'bookkeeping': [
{
'subTopic': 'Accounts Receivable',
'title': 'GTM Medical Trading - Payments Tender',
'description': 'Streamlined 3-step process for GTM Medical Trading invoice payments using AgileSuite QuickBooks system to significantly reduce processing fees while maintaining accuracy.',
'steps': [
'Step 1: Open AgileSuite Payment Form and input transaction date, total amount, and invoice count',
'Step 2: Update multi-use link amount in QuickBooks and scan QR code with separate device',
'Step 3: Process payment through customer checkout page and use action buttons to complete'
],
'benefits': [
'Cost Reduction: Saves $600-$1,000+ monthly in processing fees',
'Time Efficiency: Process 5-10 invoices simultaneously',
'Accuracy: Automated system matching prevents duplicates',
'Simplicity: Three straightforward steps replace complex manual processes'
]
}
],
'quickbooks': [],
'paytrace': [],
'fishbowl': [],
'tax': [],
'business': [],
'budgeting': []
}
# Main app
def main():
st.title("π Business Knowledge Base")
st.markdown("QuickBooks β’ PayTrace β’ Fishbowl β’ Tax Preparation β’ Business Solutions")
# Sidebar for navigation
with st.sidebar:
st.header("Categories")
selected_category = st.radio(
"Select Category:",
["Bookkeeping - Operations", "QuickBooks", "PayTrace", "Fishbowl Inventory",
"Tax Preparation", "Business Solutions", "Budgeting"],
index=0
)
st.divider()
if st.button("β Add New Content"):
st.session_state.show_add_form = True
# Main content area
if selected_category == "Bookkeeping - Operations":
display_bookkeeping_content()
else:
st.info(f"Content for {selected_category} coming soon...")
st.button("Add first article to this category")
# Add content form
if st.session_state.get('show_add_form', False):
display_add_content_form()
def display_bookkeeping_content():
st.header("Bookkeeping - Operations")
# Breadcrumb
st.caption("Home > Bookkeeping - Operations > Accounts Receivable")
# Article content
article = st.session_state.knowledge_base['bookkeeping'][0]
st.subheader(article['title'])
st.write(article['description'])
# Key points in columns
col1, col2 = st.columns(2)
with col1:
st.info("**π° Cost Savings:** $600-$1,000+ monthly")
st.info("**β±οΈ Time Savings:** Process 5-10 invoices together")
with col2:
st.info("**β
Accuracy:** Automated matching")
st.info("**π± Simple:** 3-step process")
# 3-Step Process
st.subheader("3-Step Payment Process")
steps = article['steps']
for step in steps:
st.write(f"**{step}**")
# Important Notes
st.warning("""
**Important Notes:**
- Always use separate device/QR code for payment entry
- Never manually match payments after processing
- Include shipping costs in total amount
- Contact support for issues rather than manual adjustments
""")
# Action buttons
col1, col2, col3, col4 = st.columns(4)
with col1:
if st.button("π§ Send Copy", use_container_width=True):
st.success("Copy sent to QuickBooks!")
with col2:
if st.button("π¨οΈ Print", use_container_width=True):
st.success("Ready for printing...")
with col3:
if st.button("πΎ Save", use_container_width=True):
st.success("Transaction saved!")
with col4:
if st.button("ποΈ Clear Form", use_container_width=True):
st.session_state.knowledge_base['bookkeeping'][0] = st.session_state.knowledge_base['bookkeeping'][0].copy()
st.rerun()
def display_add_content_form():
st.sidebar.divider()
st.sidebar.subheader("Add New Content")
with st.sidebar.form("add_content_form"):
category = st.selectbox("Category", list(st.session_state.knowledge_base.keys()))
sub_topic = st.text_input("Subtopic")
title = st.text_input("Article Title")
description = st.text_area("Description")
submitted = st.form_submit_button("Add Article")
if submitted:
if sub_topic and title:
# Add validation and saving logic here
st.sidebar.success("Article added successfully!")
st.session_state.show_add_form = False
st.rerun()
else:
st.sidebar.error("Please fill in required fields")
if __name__ == "__main__":
main() |