Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Global Variables
#1
Hello good day
First of all, I am amazed and thankful for the system. I come from Vtiger 7.3.0, and really CoreBos, it is infinitely more complete. It is an excellent job that they have done.
I'm having some trouble to see if you can help me.
The Global Variables module is not working well for me.
For example SalesOrder_StatusOnInvoiceSave when putting DoNotChange, it keeps modifying the status of the sales order every time I make an invoice.

I also have problems with CobroPago_Invoice_Status_OnPaid, I put the status of the invoice when making a payment is PAID, however it does not make any changes.
On the other hand, I assume that the module works in a certain part, since what has to do with view of the lists, for example, works perfectly

Thanks a lot
Reply
#2
SalesOrder_StatusOnInvoiceSave is resolve, the module of the list to select must be invoice.
Now it works correctly.

But for CobroPago_Invoice_Status_OnPaid, I tried several modules, but could not find the correct one.
Even hardcoded code invoice.php, but when I add payments it still doesn't change the invoice status to Paid

if ($amountDue<=0) {
$newStatus = GlobalVariable::getVariable('CobroPago_Invoice_Status_OnPaid', 'Paid');
if ($newStatus!='DoNotChange') {
$query = "update vtiger_invoice set invoicestatus='{$newStatus}' where invoiceid={$invoiceId}";
$adb->query($query);
if ($context=='Invoice') {
$column_fields['invoicestatus'] = $newStatus;
}
}
}
Reply
#3
HI

First, thank you for your positive comments. Very happy :-D

Glad you found the Sales Order global variable.

For the Payments module to work you have to activate the payment control functionality. In the coreBOS updater module, you will find a set of blocked updates. Those are optional updates that can be activated per install when needed. In this case, you are looking for the addPaymentFieldsToInvoice changeset. You have to unblock it and apply it. That will create a set of fields on the invoice to control partial payments: amount paid, amount due,... and it will activate the global variable you are defining

Give that a try and let us know how it goes.
Joe
TSolucio
Reply
#4
BTW, you shouldn't modify the code, either try to use a workflow or a corebos event, just to make it easier to keep up with the constant flow of changes
Joe
TSolucio
Reply
#5
(02-05-2021, 01:13 PM)jmery24 Wrote: Hello good day
First of all, I am amazed and thankful for the system. I come from Vtiger 7.3.0, and really CoreBos, it is infinitely more complete. It is an excellent job that they have done.
I'm having some trouble to see if you can help me.
The Global Variables module is not working well for me.
For example SalesOrder_StatusOnInvoiceSave when putting DoNotChange, it keeps modifying the status of the sales order every time I make an invoice.

I also have problems with CobroPago_Invoice_Status_OnPaid, I put the status of the invoice when making a payment is PAID, however it does not make any changes.
On the other hand, I assume that the module works in a certain part, since what has to do with view of the lists, for example, works perfectly

Thanks a lot

(02-05-2021, 04:37 PM)joebordes Wrote: HI

First, thank you for your positive comments. Very happy :-D

Glad you found the Sales Order global variable.

For the Payments module to work you have to activate the payment control functionality. In the coreBOS updater module, you will find a set of blocked updates. Those are optional updates that can be activated per install when needed. In this case, you are looking for the addPaymentFieldsToInvoice changeset. You have to unblock it and apply it. That will create a set of fields on the invoice to control partial payments: amount paid, amount due,... and it will activate the global variable you are defining

Give that a try and let us know how it goes.

Hi Joe, thanks for your very clear answer.

I still have questions about adding payments.

I already did what you told me about corebosupdater (all ok)
Now he left the * .php code that he had modified as the original file.
However when I make payments, it still doesn't change the status of the invoice to paid.
Maybe there is something that i am not understanding about how the module works.
I create an invoice
then I create a payment on that invoice and check the PAID box.
I save the payment and nothing ...

In global variables I have activated
CobroPago_Invoice_Status_OnPaid
with the variable "PAID"
module list: invoice
default no
mandatory yes

Thanks again.

PD: hablas español ? como te parece mas comodo ?  
Reply
#6
See if this helps:

https://youtu.be/pgSAMi5amhY

I do speak Spanish but I prefer English n the forum as we may help a bigger audience. There is a section for Spanish in the forum though and I will try to help anyway.
Joe
TSolucio
Reply
#7
(02-06-2021, 09:36 AM)joebordes Wrote: See if this helps:

https://youtu.be/pgSAMi5amhY

I do speak Spanish but I prefer English n the forum as we may help a bigger audience. There is a section for Spanish in the forum though and I will try to help anyway.

Hello Joe. Thank you very much for taking the time to help me and explain with an video. It served me, I perfectly understood the operation, I was putting the Global Variable wrong. Now it is working, thank you very much again for your help. The system is spectacular, I keep discovering it little by little.
Reply
#8
:-)
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)