Comptabilite (Super Admin) : - ComptabiliteController avec 7 exports CSV/JSON compatibles SAGE (journal ventes, grand livre, FEC, balance agee, reglements, commissions Stripe 1.5%+0.25E, couts services) - Export PDF via ComptaPdf (FPDF) avec bloc legal pre-rempli, tableau pagine, champ signature DocuSeal - Signature electronique DocuSeal + callback + envoi email signe avec template dedie (compta_export_signed.html.twig) - Rapport financier public (RapportFinancierPdf) : recettes par service, depenses (Stripe, infra, prestataires), bilan excedent/deficit - Codes comptables clients EC-XXXX (plus de 411xxx) Prestataires (Super Admin) : - Entite Prestataire (raisonSociale, siret, email, phone, adresse) - Entite FacturePrestataire (numFacture, montantHt, montantTtc, year, month, isPaid, PDF via Vich) - CRUD complet avec recherche SIRET via proxy API data.gouv.fr - Commande cron app:reminder:factures-prestataire (5 du mois) - Factures prestataires integrees dans export couts services - Sidebar Super Admin : entree Prestataires + Comptabilite Stats (/admin/stats) : - Cout prestataire dynamique depuis FacturePrestataire - Fusion Infra + Prestataire en "Cout de fonctionnement" - Commission Stripe corrigee (1.5% + 0.25E par transaction) Divers : - DocuSealService::sendComptaForSignature() + getApi() - Customer::generateCodeComptable() format EC-XXXX-XXXXX - Protection double prefixe EC- a la creation client - Bouton regenerer PDF cache quand advert state=accepted - Modals sans script inline (data-modal-open/close dans app.js) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
65 lines
3.0 KiB
YAML
65 lines
3.0 KiB
YAML
name: Discord Notification
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
notify:
|
|
runs_on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: Send Discord Embed
|
|
run: |
|
|
REPO_NAME="${{ gitea.repository }}"
|
|
BRANCH="${{ gitea.ref_name }}"
|
|
AUTHOR="${{ gitea.actor }}"
|
|
COMMIT_SHA="${{ gitea.sha }}"
|
|
SHORT_SHA="${COMMIT_SHA:0:7}"
|
|
COMMIT_URL="${{ gitea.server_url }}/${REPO_NAME}/commit/${COMMIT_SHA}"
|
|
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
|
|
COMMIT_MSG=$(git log -1 --pretty=format:'%s' | head -c 200)
|
|
FILES_CHANGED=$(git diff --stat HEAD~1 HEAD 2>/dev/null | tail -1 || echo "premier commit")
|
|
FILE_COUNT=$(git diff --name-only HEAD~1 HEAD 2>/dev/null | wc -l || echo "0")
|
|
FILES_LIST=$(git diff --name-only HEAD~1 HEAD 2>/dev/null | head -15 | sed 's/^/• /' || echo "• premier commit")
|
|
|
|
if [ "$FILE_COUNT" -gt 15 ]; then
|
|
REMAINING=$((FILE_COUNT - 15))
|
|
FILES_LIST=$(printf '%s\n... et %s autres fichiers' "$FILES_LIST" "$REMAINING")
|
|
fi
|
|
|
|
# Escape for JSON
|
|
COMMIT_MSG_ESC=$(echo "$COMMIT_MSG" | sed 's/\\/\\\\/g; s/"/\\"/g; s/\t/\\t/g')
|
|
FILES_CHANGED_ESC=$(echo "$FILES_CHANGED" | sed 's/\\/\\\\/g; s/"/\\"/g; s/\t/\\t/g')
|
|
FILES_LIST_ESC=$(echo "$FILES_LIST" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/\\/\\\\/g; s/"/\\"/g' | sed 's/\\\\\\\\/\\\\/g')
|
|
|
|
cat > /tmp/discord.json <<DEOF
|
|
{
|
|
"embeds": [{
|
|
"title": "DEPOT CRM E-Cosplay",
|
|
"description": "${COMMIT_MSG_ESC}",
|
|
"url": "${COMMIT_URL}",
|
|
"color": 16156748,
|
|
"fields": [
|
|
{"name": "Branche", "value": "\`${BRANCH}\`", "inline": true},
|
|
{"name": "Commit", "value": "[\`${SHORT_SHA}\`](${COMMIT_URL})", "inline": true},
|
|
{"name": "Auteur", "value": "${AUTHOR}", "inline": true},
|
|
{"name": "Statistiques", "value": "\`\`\`${FILES_CHANGED_ESC}\`\`\`", "inline": false},
|
|
{"name": "Fichiers modifies (${FILE_COUNT})", "value": "\`\`\`${FILES_LIST_ESC}\`\`\`", "inline": false},
|
|
{"name": "Applications E-Cosplay", "value": "[CRM](https://crm.e-cosplay.fr) - Plateforme de gestion clients/revendeurs\\n[Signature](https://sign.e-cosplay.fr) - Signature electronique DocuSeal\\n[Paiement](https://payment.e-cosplay.fr) - Portail de paiement Stripe\\n[Status](https://status.e-cosplay.fr) - Page de status des services\\n[Stripe Connect](https://stripe.e-cosplay.fr) - Webhooks Stripe et redirection dashboard Connect", "inline": false}
|
|
],
|
|
"footer": {"text": "${REPO_NAME}"},
|
|
"timestamp": "${TIMESTAMP}"
|
|
}]
|
|
}
|
|
DEOF
|
|
|
|
curl -sf -X POST \
|
|
-H "Content-Type: application/json" \
|
|
-d @/tmp/discord.json \
|
|
"${{ secrets.DISCORD_WEBHOOK }}"
|