Guest User

Untitled

a guest
Sep 18th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. function calIGV(Id) {
  2. var record = app.models.Prueba.getRecord(Id);
  3. var igv = 0.0;
  4. //record.IGV = igv;
  5. igv += (record.Sueldo + record.Sueldo_2) * 0.18;
  6. record.Nombre_Apellidos = record.Nombre + ' ' + record.Apellidos;
  7. record.IGV = igv;
  8. app.saveRecords([record]);
  9. }
  10.  
  11. function actualizarIGV() {
  12. console.log('Este es el ID: ' + Session.Id);
  13. var key = app.datasources.Prueba.item._key;
  14. google.script.run.withSuccessHandler(function(){
  15. app.datasources.Prueba.load();
  16. }).calIGV(key);
  17. }
Add Comment
Please, Sign In to add comment