andre 1 rok temu
rodzic
commit
257299436c
1 zmienionych plików z 27 dodań i 0 usunięć
  1. 27 0
      move_fund_invoice_due_date.php

+ 27 - 0
move_fund_invoice_due_date.php

@@ -0,0 +1,27 @@
+<?php
+
+// this hook offsets the due date of an invoice for add fund using order grace days
+
+if (!defined("WHMCS"))
+    die("This file cannot be accessed directly");
+
+use WHMCS\Database\Capsule;
+function get_grace() {
+    $grace = Capsule::table('tblconfiguration')->where('setting', 'OrderDaysGrace')->first();
+}
+
+add_hook('PreInvoicingGenerateInvoiceItems', 1, function($vars) {
+    $grace = get_grace();
+
+    logModuleCall(
+        'PreInvoicingGenerateInvoiceItems',
+        __FUNCTION__,
+        $vars,
+        "Debug",
+        $grace
+    );
+    
+    return true;
+});
+
+?>