Skip to content

Instantly share code, notes, and snippets.

View trico's full-sized avatar
🚀
Brrrrrr

Eric Ponce trico

🚀
Brrrrrr
  • Barcelona, Spain
View GitHub Profile
module CampaignBlock::ReportManager
class ReportIncrementalBudget
def self.default_year
Date.current.year
end
def self.default_month
Date.current.month
end
module CampaignBlock::ReportManager
class ReportIncrementalBudget
attr_accessor :year, :month, :report
def self.default_year
Date.current.year
end
def self.default_month
Date.current.month
end
@trico
trico / t.rb
Created December 20, 2018 12:53
+-------------------+ +---------------------+
| Master | | Staging |
| | | |
+-------------------+ +---------------------+
Rama A | |
require 'csv'
require 'date'
memory_customer_id = 0
memory_points = 0
memory_last_date = nil
memory_location_id = 0
debug = true
CSV.foreach('main.csv').each do |line|
{
"operations": [
{
"operationAmount": {
"totalWithDiscount": 1,
"totalWithoutDiscount": 1
},
"operationTaxes": [
{
"percentage": 6
ieoooeukiauqodelghkpjfaoeaeea
omyzwjuvioutmgrmreuamqahnhyfa
eñoeuyuvepiamatmziwiapojueoco
atoaañobeekijboozvaifxumaaaju
ihaaoyamwñxdvaoasxigcruqeoicu
okgcrlororvouaedmeceuheqhcsso
aeeioeuzexabavoqimodibaueaeea
npmqjdwqpopwiseñroeoixvdpdgxn
iiññeoabqrgobaepuiolacqewouio
eodovkgifoisoyfuyeogijooiiaia