This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Fetch the late fee percentage from organization custom fields | |
| OrgCustom_fieldsList = organization.get("custom_fields").toList(); | |
| for each custom_fields in OrgCustom_fieldsList | |
| { | |
| if (custom_fields.get("label") == "Frais de retard - Pourcentage") | |
| { | |
| PercentFee = custom_fields.get("value"); | |
| info PercentFee; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| string standalone.google_place_api1(String Address, String City, String place_id) | |
| { | |
| data = Map(); | |
| data.put("key", "YOUR_GOOGLE_API_KEY"); // Replace with connection or encrypted variable | |
| data.put("language", "fr"); | |
| if (place_id == "") | |
| { | |
| urlApi = "https://maps.googleapis.com/maps/api/place/autocomplete/json"; | |
| data.put("input", Address + ", " + City + ", Canada"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Get the associated CRM Deal ID and the invoice subtotal | |
| invoiceDealId = invoice.get("zcrm_potential_id"); | |
| invoiceSubTotal = invoice.get("sub_total"); | |
| // Prepare the map to update the Deal | |
| subtotal = Map(); | |
| subtotal.put("Amount", invoiceSubTotal); | |
| // Retrieve the Deal details (optional if only updating) | |
| dealDetails = zoho.crm.getRecordById("Deals", invoiceDealId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Retrieve the retainer invoice ID and organization ID | |
| retainer_invoice_id = retainer_invoice.get("retainerinvoice_id"); | |
| retainer_invoice_total = retainer_invoice.get("total"); | |
| organization_id = organization.get("organization_id"); | |
| info "Invoice total: " + retainer_invoice_total; | |
| // Check if the invoice total exceeds 10,000 before applying updates | |
| if (retainer_invoice_total > 10000) | |
| { | |
| info "Invoice exceeds 10,000, updating payment options..."; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| organizationID = organization.get("organization_id"); | |
| estimate_id = invoice.get("estimate_id"); | |
| invoice_id = invoice.get("invoice_id"); | |
| updated_line_items = list(); | |
| if (estimate_id != null) | |
| { | |
| info "Start processing – Estimate ID: " + estimate_id; | |
| estimate_details = zoho.books.getRecordsByID("estimates", organizationID, estimate_id, "booksfull"); |