Skip to content

Instantly share code, notes, and snippets.

View barredterra's full-sized avatar

Raffael Meyer barredterra

View GitHub Profile
@barredterra
barredterra / pseudo-register.md
Last active July 8, 2025 21:56
Aktuelle pseudo Amtsgericht- & Handelsregister-Rechnungen nach Firmengründung: Merkmale, Warnsignale und Tipps, wie Sie die Betrugsmasche sicher erkennen.

Kurz nachdem ich mein neu gegründetes Unternehmen ins Handelsregister eintragen ließ, flatterten innerhalb weniger Tage zwei vermeintlich amtliche Schreiben ins Haus: Erst eine angebliche Rechnung einer „Zentralen Zahlstelle des Amtsgerichts“, dann eine „Offerte“ der selbsternannten „Handelsregister Deutschland – HNDRG GmbH“. Beide Briefe forderten dreistellige Beträge auf ausländische IBAN-Konten und drohten bei Nichtzahlung mit Mahngebühren oder Datenlöschung. Die folgenden Beschreibungen zeigen, wie diese Schreiben aufgebaut sind und woran man die Betrugsmasche erkennt.

Scheinrechnung „Handelsregister Deutschland“ mit irischer IBAN

hndrg

Ein Schreiben im Behörden-Look trägt die Kopfzeile Handelsregister Deutschland und richtet sich an die neu gegründete GmbH. Es verlangt unter Angabe eines Aktenzeichens binnen drei Werktagen eine Zahlung von 825 €. Das Geld soll auf ein Konto mit der irischen IBAN **IE65 M

@barredterra
barredterra / distance.py
Last active May 27, 2025 14:50
Get distance between two places via Google Routes API
# TODO:
# 1. Enable API: https://console.cloud.google.com/marketplace/product/google/routes.googleapis.com
# 2. Create an API Key: https://console.cloud.google.com/google/maps-apis/credentials
resp = frappe.make_post_request(
url="https://routes.googleapis.com/distanceMatrix/v2:computeRouteMatrix",
headers={
"Content-Type": "application/json",
"X-Goog-Api-Key": "YOUR_API_KEY_HERE",
"X-Goog-FieldMask": "distanceMeters"

This app operates on your ERP instance only.

  • It does not transfer any data to the provider of the app.
  • It does not allow the provider of the app to access your data.
Moved to https://github.com/barredterra/pretty_release_notes
@barredterra
barredterra / snapaddy-privacy.md
Created March 4, 2024 09:47
Privacy policy for SnapADDY-ERPNext integration

This app operates on your local system only.

  • It does not transfer any data to the provider of the app.
  • It does not allow the provider of the app to access your data.

This app enables your system to accept data via an authenticated webhook and create a Lead record from this data. It will respond with an error message or with a link to the newly created Lead. If a duplicate Lead exists in the system already, it will respond with a link to the existing Lead. Thus, the authenticated caller of the webhook (usually snapADDY) will receive information about the ID of the Lead and any error messages (possibly along with stack traces).

@barredterra
barredterra / system_console.py
Last active February 5, 2024 19:56
Fix Timesheet Billing Status
# When a Sales Invoice is submitted, amended and cancelled multiple times, Timesheets might end up in the "Submitted" status
# while they are in fact billed.
#
# This script iterates over submitted, unbilled Timesheets. If the Timesheet is linked to a paid Sales Invoice, it
# will be marked as fully billed.
#
# This script can be run in the ERPNext System Console. First, make a dry run with the "Commit" checkbox deactivated. This
# will show all affected timesheets. Then activate "Commit", if you want to persist the fixes.
log("Fixed Timesheets:")
@barredterra
barredterra / dialog_promise.js
Last active March 3, 2023 19:39
Comfortably work with dialogs in Frappe Framework
function dialog_promise (title, fields, primary_action_label) {
// Return a function that returns a promise
// The promise resolves when the dialog is submitted and rejects when the dialog is closed
// On resolve, the promise returns the values from the dialog.
return () => new Promise((resolve, reject) => {
const dialog = new frappe.ui.Dialog({
title: title,
fields: fields,
onhide: () => reject(),
primary_action_label: primary_action_label,
@barredterra
barredterra / address.js
Last active June 23, 2021 12:11
ERPNext: automatically set Tax Category in Address DocType
// Client Script
frappe.ui.form.on("Address", {
refresh(frm) {
frm.trigger("set_tax_category");
},
country(frm) {
frm.trigger("set_tax_category");
},
links(frm) {
frm.trigger("set_tax_category");