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
<?php add_filter( 'bulk_actions-edit-product', 'bulk_actions_actualizar_marca', 20, 1 ); | |
function bulk_actions_actualizar_marca( $actions ) { | |
$actions['actualizar_marca_celima'] = 'Actualziar marca a Celima'; | |
$actions['actualizar_marca_trebol'] = 'Actualziar marca a Trebol'; | |
return $actions; | |
} | |
add_filter( 'handle_bulk_actions-edit-product', 'handle_bulk_action_actualizar_marca', 10, 3 ); | |
function handle_bulk_action_actualizar_marca( $redirect_to, $action, $post_ids ) { | |
$processed_ids = array(); |
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
function myFunction() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var data = sheet.getDataRange().getValues(); | |
var codigos = { | |
'PER' : 51, | |
'USA' : 1, | |
'CHI' : 56, | |
'COL' : 57 | |
} | |
for (var i = 1; i < data.length; i++) { |
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
<?php $ruta_ws_prod = 'https://e-guiaremision.sunat.gob.pe/ol-ti-itemision-guia-gem/billService?wsdl'; | |
$ruc = '20552543549'; | |
$usuario_sol = 'SUPER021'; | |
$pass_sol = 'Super021'; | |
$client = new \SoapClient($ruta_ws_prod, array("trace" => true, "soap_version" => SOAP_1_1, 'exceptions'=>FALSE, 'cache_wsdl' => WSDL_CACHE_NONE)); | |
$WSHeader = '<ns2:Security><ns2:UsernameToken><ns2:Username>' . $ruc . $usuario_sol . '</ns2:Username><ns2:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $pass_sol . '</ns2:Password></ns2:UsernameToken></ns2:Security>'; | |
$headers = new \SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', new \SoapVar($WSHeader, XSD_ANYXML)); | |
$client->__setSoapHeaders($headers); |
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
<?php /* CRON PARA PYMEX */ | |
add_action( 'init', 'cron_republicar_init' ); | |
function cron_republicar_init() { | |
register_post_type( | |
'cron-logs', array( | |
'labels' => array('name' => 'Cron Logs', 'singular_name' => 'Log'), | |
'public' => true, | |
'exclude_from_search' => true, |
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
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?> | |
<DespatchAdvice xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:sac="urn:sunat:names:specification:ubl:peru:schema:xsd:SunatAggregateComponents-1" xmlns="urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2"> | |
<ext:UBLExtensions> | |
<ext:UBLExtension> | |
<ext:ExtensionContent></ext:ExtensionContent> | |
</ext:UBLExtension> | |
</ext:UBLExtensions> | |
<cbc:UBLVersionID>2.1</cbc:UBLVer |
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
<?php $xmlsunat = file_get_contents("20552543549-09-TF01-1.zip"); | |
$base64 = base64_encode($xmlsunat); | |
try{ | |
$client = new SoapClient('https://e-beta.sunat.gob.pe/ol-ti-itemision-guia-gem-beta/billService?wsdl'); | |
$res = $client->sendBill(array( | |
'fileName' => '20552543549-09-TF01-1.zip', | |
'contentFile' => $base64, | |
'partyType' => 'ns1:billService' | |
)); | |
} catch (SoapFault $e){ |
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
<?php | |
namespace jossmp\servir; | |
class servir | |
{ | |
var $curl; | |
var $list_error = array(); | |
function __construct() | |
{ |
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
import { Injectable } from '@angular/core'; | |
import { HttpClient } from '@angular/common/http'; | |
import { ActivatedRoute, Router } from '@angular/router'; | |
import * as M from "materialize-css/dist/js/materialize"; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class ResourcesService { |
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
<?php add_action('admin_head', 'c7_admin_head'); | |
function c7_admin_head() { ?> | |
<style> | |
.select-autores { | |
width: 100%; | |
} | |
#asignar-autores-modal { | |
position: fixed; | |
width: 300px; | |
min-height: 300px; |
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
<?php add_action('admin_head', 'c7_admin_head'); | |
function c7_admin_head() { ?> | |
<style> | |
.select-autores { | |
width: 100%; | |
} | |
#asignar-autores-modal { | |
position: fixed; | |
width: 300px; | |
min-height: 300px; |